Can someone help tame this setup for unit testing?


#1

I’m currently working on a .NET Standard library and I want to make sure that it is working in all the places that it should. So I created unit tests projects for UWP, Xamarin iOS, and Xamarin Android. These all work nicely as they are all in csproj format (and I managed to hack the two .NET standard DLLs I use via PCL -> .NET standard upgrade as well). The problem is coming from trying to unit test on .NET Core. I feel like VS2015 and .NET Core are at war with each other. A brief intro to my setup:

I have some C++ libs that I am building, and I want them to be copied as part of the build process of the next level, which is P/Invoke bindings (through a C interface). This level is .NET Standard 1.3. The next level is our API which is .NET Standard 1.4 and finally the test project which consumes the API assembly.

I don’t want to convert the two .NET Standard projects into xproj format because I don’t understand it nearly as well as csproj but I can’t seem to make an xunit csproj style project which means that I’m stuck because sometimes visual studio barfs at things inside of project.json which if not present will cause CLI to fail to build.

What I want is a way to create a csproj that will both execute .NET core tests inside of visual studio 2015 and maintain the proper dependencies throughout the build (i.e. keep the native libs intact all the way up to the test project which usually happens via project reference). Is this something that is possible?


.NET Foundation Website | Blog | Projects | Code of Conduct