I'm trying to build an app using .NET Core 2.0.0 Preview 1 on VSTS, but I'm getting this error while trying to restore the nuget packages:
Unable to resolve 'Microsoft.NETCore.App (>= 2.0.0)' for '.NETCoreApp,Version=v2.0'.
Any workaround for this?
Here is how I solved the issue.
Use .NET Core Tool Installer (Preview) as the immediate after get source step.
Use the Nugget feed as next step
Finally build steps looks like this.
It seems you were use Hosted VS2017 agent to queue your build. While Hosted VS2017 agent only has .NET core 1.0.0 installed (you can find installed software here).
The work around to build apps using .NET core 2.0.0, you should use a private agent where the .NET core 2.0.0 and Visual Studio 2017 Preview 15.3 is installed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With