Aspnet core 2.0 build fails using vsts but builds successfully on local machine. During the build i get the following:
2017-08-09T21:02:23.8120816Z Package Microsoft.AspNetCore 2.0.0-preview2-final is not compatible with netcoreapp2.0 (.NETCoreApp,Version=v2.0). Package Microsoft.AspNetCore 2.0.0-preview2-final supports: netstandard2.0 (.NETStandard,Version=v2.0)
2017-08-09T21:02:23.8120816Z Package Microsoft.AspNetCore.Hosting 2.0.0-preview2-final is not compatible with netcoreapp2.0 (.NETCoreApp,Version=v2.0). Package Microsoft.AspNetCore.Hosting 2.0.0-preview2-final supports: netstandard2.0 (.NETStandard,Version=v2.0)
2017-08-09T21:02:23.8120816Z Package Microsoft.AspNetCore.Hosting.Abstractions 2.0.0-preview2-final is not compatible with netcoreapp2.0 (.NETCoreApp,Version=v2.0). Package Microsoft.AspNetCore.Hosting.Abstractions 2.0.0-preview2-final supports: netstandard2.0 (.NETStandard,Version=v2.0)
2017-08-09T21:02:23.8120816Z Package Microsoft.AspNetCore.Http.Abstractions 2.0.0-preview2-final is not compatible with netcoreapp2.0 (.NETCoreApp,Version=v2.0). Package Microsoft.AspNetCore.Http.Abstractions 2.0.0-preview2-final supports: netstandard2.0 (.NETStandard,Version=v2.0)
2017-08-09T21:02:23.8130823Z Package Microsoft.AspNetCore.Mvc 2.0.0-preview2-final is not compatible with netcoreapp2.0 (.NETCoreApp,Version=v2.0). Package Microsoft.AspNetCore.Mvc 2.0.0-preview2-final supports: netstandard2.0 (.NETStandard,Version=v2.0)
2017-08-09T21:02:23.8130823Z Package Microsoft.AspNetCore.Mvc.ViewFeatures 2.0.0-preview2-final is not compatible with netcoreapp2.0 (.NETCoreApp,Version=v2.0). Package Microsoft.AspNetCore.Mvc.ViewFeatures 2.0.0-preview2-final supports: netstandard2.0 (.NETStandard,Version=v2.0)
2017-08-09T21:02:23.8130823Z Package Microsoft.AspNetCore.Routing 2.0.0-preview2-final is not compatible with netcoreapp2.0 (.NETCoreApp,Version=v2.0). Package Microsoft.AspNetCore.Routing 2.0.0-preview2-final supports: netstandard2.0 (.NETStandard,Version=v2.0)
2017-08-09T21:02:23.8130823Z Package Microsoft.AspNetCore.StaticFiles 2.0.0-preview2-final is not compatible with netcoreapp2.0 (.NETCoreApp,Version=v2.0). Package Microsoft.AspNetCore.StaticFiles 2.0.0-preview2-final supports: netstandard2.0 (.NETStandard,Version=v2.0)
2017-08-09T21:02:23.8130823Z One or more packages are incompatible with .NETCoreApp,Version=v2.0.
2017-08-09T21:02:23.8130823Z
2017-08-09T21:02:23.8130823Z NuGet Config files used:
2017-08-09T21:02:23.8130823Z C:vsts-agent_work25NugettempNuGet_738.config
2017-08-09T21:02:23.8130823Z
2017-08-09T21:02:23.8130823Z Feeds used:
2017-08-09T21:02:23.8130823Z https://api.nuget.org/v3/index.json
2017-08-09T21:02:23.8480839Z ##[error]Error: C:vsts-agent_work_toolNuGet4.0.0x64nuget.exe failed with return code: 1
2017-08-09T21:02:23.8480839Z ##[error]Packages failed to restore
My project file (.csproj) is as attached
proj.txt
:
I just tried building on VSTS and have exactly the same problem. Builds just fine locally with VS 2017.3, but the "Restore" build step on VSTS fails. I'm using the 'Hosted VS2017' agent queue and the 'Version 2.* (preview)' (the only one available) in the restore step.
I will also attach my .csproj file
csprojproject.txt
I've got the same issue.
Build on local VS2017.3 on my desktop. I've update my azure build agent on VS2017.3, with Netcore2.0 SDK, but it failed each
I attach my csproj file. csproj.txt
I've got the same issue. Build is fine locally with VS 2017.3. It seems that I am not alone, hopefully soon we find a solution for that. I attach my csproj.txt
I have the same problem - try to update NuGet to version 4.3 on build machine.
I had this problem and had to modify my build configuration. I answered a similar question with my solution on Stack Overflow: https://stackoverflow.com/questions/45717283/vsts-build-packages-failed-to-restore-unable-to-resolve-netstandard-library/45739237#45739237.
Awesome, that worked for us too. Thanks @patoncrispy
@patoncrispy Worked for us as well!
Yep! Worked also for me!
Works, Thanks
No problem! I just wish these things were better documented, or at least, more visible.
update your visual studio 2017 to latest version and it worked for me
I'm on VS2017 15.4.4 and still can't build due to these errors. The weird thing is that it used to work, then I had to go back to a restore point due to blue screen issues and even after completely uninstalling and reinstalling VS it still won't build.
@Jacquers , have you resolved this issue?
It resolved when VS updated
Most helpful comment
I had this problem and had to modify my build configuration. I answered a similar question with my solution on Stack Overflow: https://stackoverflow.com/questions/45717283/vsts-build-packages-failed-to-restore-unable-to-resolve-netstandard-library/45739237#45739237.