Reputation: 217
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?
Upvotes: 5
Views: 796
Reputation: 4862
I believe it has been resolved already and you use the valid version of NuGet, but you can also add a command line as a new build step, just after the NuGet Installer, and invoke dotnet restore
(Tool: dotnet
, Arguments: restore
).
Upvotes: 1
Reputation: 5520
You could expand Advanced section, and select latest version of Nuget. As of October 2016 that was Nuget 3.5 rc2
Upvotes: 4