问题
I'm using one of those new "Class Library (NuGet Package)" templates from Visual Studio, and I want to create an xUnit test library for it.
The problem is, when I create a new .csproj library and try to reference the .xproj package, Visual Studio says "The reference to XXXX could not be resolved."
Why is this happening and what can I do to fix this?
回答1:
You can use the SideWaffle template pack VS extension to create xUnit project templates using the new xproj project type. It is developed by a Microsoft developer and is the recommended approach at the moment (It is what they use in ASP.NET 5).
来源:https://stackoverflow.com/questions/32356023/referencing-an-asp-net-xproj-from-a-csproj