aspnet/Testing

Testing non-DNX frameworks in project.json

Closed this issue · 4 comments

The Newtonsoft.Json.Tests project.json has multiple frameworks: net45, net40, Portable 259, dotnet.

Right now when I run tests in VS it appears that it only supports running tests for the dotnet framework. There should be the ability to run the net45 (and net40, PCL, etc) test project against the equivalent framework output from the Newtonsoft.Json project.json.

Eilon commented

We need to figure out what is the right experience here. DNX will gladly compile the test project for all the specified targets, but discovering and running the non-DNX targets is another story.

Today you still have to cross link your tests into runtime specific targets (ex we can't run your phone tests in the phone emulator for you). No plans to deliver a better experience in this release.

I think this is a DNX issue. It should be possible to explicitly specify a framework when specifying a dependency and that framework's DLL will be loaded instead of DNX choosing for you.

Specifying a framework would allow you to have a unit test project test the DLL built for net45, not40, Portable 259, etc.

Eilon commented

Closing because this issue is ancient, and no longer applies. Everything is CSPROJ!