-
Notifications
You must be signed in to change notification settings - Fork 224
Project.json doesn't support portable frameworks when including output from .csproj #608
Comments
I believe you need to use the beautiful format |
I would expect to be able to use the same shortened framework names as NuGet does. After all you use net45 in the project.json instead of Plus, we really don't want people to have to specify the profile number. It's arbitrary and doesn't have any meaning in and of itself. The list of platforms in something like |
Fortunately this will never be a first class feature. It was hacked in for compatibility so the priority on this is pretty low IMO. FYI it might work if you remove the |
If this is not going to be a first class feature, then what is the supported way to build a system like this:
The obvious way would be to make the common project a PCL, but is there a different preferred means? |
What doesn't work? |
Here's a minimal solution demonstrating the scenario: There are a couple of projects designed for different verticals, each referencing a common library which uses the Debug.WriteLine() api (available on all iterations of .NET). You'll see there's one compile error, from the ASP.NET 5 frontend - it isn't able to reference the project CommonLibrary. Trying to add it as a reference using visual studio fails, and this issue seems to be about doing the same thing via project.json. |
This actually works fine and compiles for me. I had to add a reference to System.Runtime in the aspnet50 section but adding a reference in visual studio works. |
Interesting. I'm using VS2015 ctp 5, and the Add Reference dialog brings up an error reading "The following projects are not supported as reference: CommonLibrary". I tried adding it by hand, producing this project.json file: The error in that case is CS0103 The name 'CommonLibrary' does not exist in the current context But if this is going to be supported by whatever means, that's fine- bugs in the moment don't matter. |
To reference a portable project from an ASP.NET vNext project, you can drop a project.json file next to the portable .csproj, as described here.
In this case, I would expect to be able to use the same framework name as NuGet uses for the lib folder. But if I use something like "portable-net45+win8+wp8+k10", I get an error:
The text was updated successfully, but these errors were encountered: