I create .Net Core Librarythat can be used by the application ASP.NET Core. By default, Visual Studio creates project.json as shown below.
{
"dependencies": {
"NETStandard.Library": "1.6.0"
},
"frameworks": {
"netstandard1.6": {
"imports": "dnxcore50"
}
},
"version": "1.0.0-*"
}
I think it is recommended to use netstandard1.xfor libraries that will be used by other applications. I'm going to remove "imports": "dnxcore50"it because it was for older versions of the .NET Core preview (before the release of the .NET Framework 1.0 RTM and .NET Core RC2)
Now I wanted to unit test this library using xunit, and then the article Getting Started with xUnit.net (.NET Core / ASP.NET Core)
, however, xunit suggests marking the library as .Net Core Application
, , , , .NET Core ( netcoreapp1.0). .NET CLI , unit test *, . , , dotnet-test-xunit . Visual Studio, , .
, project.josn, , unit test. :
1 > .Net Core netstandard1.6 netcoreapp1.0, ?