I have a class library project (Package), a new preview template in RTM RT 2015, from which I want to run Xunit tests.
The solution builds fine, but Test Explorer does not find any tests. From project.json you can see that I am only targeting net45, not dnx, so I use xunit.runner.visualstudio.
{ "dependencies": { "myproject": "", "xunit": "2.1.0-*", "xunit.runner.visualstudio": "2.1.0-*" }, "frameworks": { "net45": { "frameworkAssemblies": { "System.Runtime": "4.0.0.0" } } } }
When I change the project type to a regular class library, tests are selected. However, since the code I'm trying to verify is a class library project (package), referencing it from a regular class library is problematic, and I was hoping this would work. Is this possible (or some options)?
Context
Usually this type of project is used for ASP.NET 5, Core CLR, etc. Despite the fact that I only target net45, I use it because I want to use a function where I can easily use the local source code instead of the nuget package (via the projects global.json attribute). This makes it easier to work on a package that depends on another, where I often make local changes.
c # visual-studio-2015 xunit dnx
Carolyn van slyck
source share