We have been focusing on the new JavaScript capabilities of Visual Studio 2015 CTP 6 for the past few weeks. We were sorta expecting other basic .NET aspects to just work.
Today, we just tried to add some Unit Tests using NUnit to a WebAPI project and we are 0 for 20 (since it's opening day!) No matter what we try, we can't seem to even be able to add a NuGet package reference to NUnit (including 2.6.4 and 3.0.0-beta1).
Anybody have any suggestions on how to get NUnit tests to work with against ASP.NET 5 WebAPI projects?
Here is what we are doing:
Adding the new 4.6 ASP.NET 5 project
We are interested in the WebAPI stuff:
We read about issues with NuGet Package manager from NuGet Beta2, so we installed that version. And updated our configuration:
We can find the NUnit package (3.0 beta)
But in the end, this is all we get in the output window:
And the references are missing:
Here is our Project.json for this project:
{
/* Click to learn more about project.json http://go.microsoft.com/fwlink/?LinkID=517074 */
"webroot": "wwwroot",
"version": "1.0.0-*",
"dependencies": {
"Microsoft.AspNet.Server.IIS": "1.0.0-beta3",
"Microsoft.AspNet.Mvc": "6.0.0-beta3",
"Microsoft.AspNet.StaticFiles": "1.0.0-beta3",
"Microsoft.AspNet.Server.WebListener": "1.0.0-beta3",
"NUnit": "3.0.0-beta-1"
},
"frameworks": {
"aspnet50": {},
"aspnetcore50": {}
},
"exclude": [
"wwwroot",
"node_modules",
"bower_components"
],
"bundleExclude": [
"node_modules",
"bower_components",
"**.kproj",
"**.user",
"**.vspscc"
]
}
kpm restore
output ? – agua from mars