There are two projects in my solution currently: a Windows Class Library (targeting .NET Framework 4.6.1) and another class library that targets .NET Standard 1.3. I'm using Visual Studio 2015 Update 3.
I've added a reference to the .NET Standard project from the other project and it appears in the list of references, but I can't see any of the classes or namespaces from the referenced library when I want to use them (even though the referenced library was successfully built and has no errors).
This is the project.json for the .NET Standard library project:
{
"version": "1.0.0-*",
"dependencies": {
"NETStandard.Library": "1.6.0"
},
"frameworks": {
"netstandard1.3": {
"imports": "dnxcore50"
}
}
}
I thought that .NET 4.6.1 projects can use .NET Standard 1.3 libs, and I even tried to use lower versions (1.0), but the result is the same. What am I missing here?
If I run
dotnet restore
it also works fine:
log : Restoring packages for C:\Users\Zsolt\Documents\Visual Studio 2015\Projects\PWB\PWBSpreadsheet.Entities\project.json...
log : Restoring packages for C:\Users\Zsolt\Documents\Visual Studio 2015\Projects\PWB\PWBSpreadsheet.Parser\project.json...
log : Writing lock file to disk. Path: C:\Users\Zsolt\Documents\Visual Studio 2015\Projects\PWB\PWBSpreadsheet.Parser\project.lock.json
log : C:\Users\Zsolt\Documents\Visual Studio 2015\Projects\PWB\PWBSpreadsheet.Parser\PWBSpreadsheet.Parser.xproj
log : Restore completed in 408ms.
log : Writing lock file to disk. Path: C:\Users\Zsolt\Documents\Visual Studio 2015\Projects\PWB\PWBSpreadsheet.Entities\project.lock.json
log : C:\Users\Zsolt\Documents\Visual Studio 2015\Projects\PWB\PWBSpreadsheet.Entities\PWBSpreadsheet.Entities.xproj
log : Restore completed in 417ms.
{ "supports": {}, "dependencies": { "Microsoft.NETCore.Portable.Compatibility": "1.0.1", "NETStandard.Library": "1.6.0" }, "frameworks": { "netstandard1.1": {} } }
lowest i could go is 1.1 – Orthohydrogen