Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Referencing an ASP.NET xproj from a csproj

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?

like image 421
James Ko Avatar asked Dec 06 '25 03:12

James Ko


1 Answers

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).

like image 59
Muhammad Rehan Saeed Avatar answered Dec 07 '25 20:12

Muhammad Rehan Saeed