I have recently updated my portable class libraries to target .NET Core, using project.json, and the new netstandard1.0 framework moniker. My understanding is that this is supported now in Nuget 3.4. I have the following project.json for my project:
{
"supports": {},
"dependencies": {
"Microsoft.NETCore.Portable.Compatibility": "1.0.1",
"NETStandard.Library": "1.6.0"
},
"frameworks": {
"netstandard1.0": {}
}
}
This builds great from Visual Studio 2015 Update 3.
However, when using VSTS (was Visual Studio Online) build, it now gives me the following error during the Package Restore step:
The project 'MyProject' does not specify any target frameworks in 'C:\a\1\s\MyProject\project.json'.
The command it shows executing is:
NuGet.exe restore "C:\a\1\s\Build.sln" -NonInteractive -configfile "C:\a\1\NuGet\newNuGet.config"
Is this due to executing restore against a solution? Or perhaps VSTS Build task is not yet using Nuget 3.4?
NETStandard.Library
1.6.0 is the only release version ofNETStandard.Library
on NuGet. It's fine to depend on that even if you're using a lower version ofnetstandard
. – svicknetstandard1.0
projects. The release version != the target framework version. (It's silly that they look the same) – Nate Barbettini