Reputation: 682
According to this excellent writedown of how to reference regular C# library projects in an asp.net 5 project, the DNU wrap
command is the preferred way to do it.
Unfortunately dnu wrap ".\Foo\Bar\MyProject.csproj"
does not work, and just outputs
Microsoft .NET Development Utility Clr-x86-1.0.0-beta8-15858
Failed to resolve references for D:\SomeFolder\Foo\Bar\MyProject.csproj
The project that should be wrapped is a regular class library. Target frameworks 4.5 and 4.6 have been tried, both produced the same error.
When trying to add a reference to the project in VS2015 using the Reference Manager, nothing happens. There is no error message, but no reference is added and no wrapper project.json
is generated.
The Reference Manager seems to be overall not working for the (asp net 5 class library) project in question, which has dotnet
specified as its framework target in the project.json
. The Assemblies tab is empty, and Browse... gives a warning of Project does not have target frameworks specified.
.
Upvotes: 2
Views: 342
Reputation: 682
Solution was found, the path to the nuget targets file in the (.csproj) project to be wrapped was incorrect. Apparently this had no detrimental effect on regularly building and using it, but prevented DNU from resolving the dependencies.
Upvotes: 1