Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Building apps using .NET Core 2.0.0 Preview 1 on VSTS

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?

like image 604
andrecarlucci Avatar asked Jul 04 '17 20:07

andrecarlucci


2 Answers

Here is how I solved the issue.

  1. Use .NET Core Tool Installer (Preview) as the immediate after get source step. enter image description here

  2. Use the Nugget feed as next step

enter image description here

  1. Change Restore step to use Feed(s) I select here.

enter image description here

Finally build steps looks like this.

enter image description here

like image 159
Rukshan Dangalla Avatar answered Sep 22 '22 13:09

Rukshan Dangalla


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.

like image 22
Marina Liu Avatar answered Sep 22 '22 13:09

Marina Liu