I have a dotnet web api project with EF. When I try to configure build and run the Nuget Restore step fails with below errors
The nuget command failed with exit code(1) and error(Errors in E:\TFS_Agents2017\...\s\ABC.Employees\ABC.Employees.csproj
Unable to resolve 'Microsoft.NETCore.App (>= 3.1.0)' for '.NETCoreApp,Version=v3.1'.
Errors in E:\TFS_Agents2017\....\s\EmployeesEF\EmployeesEF.csproj
Unable to resolve 'Microsoft.NETCore.App (>= 3.1.0)' for '.NETCoreApp,Version=v3.1'.
Errors in E:\TFS_Agents2017\...\s\UnitTests\abcUnitTests.csproj
Unable to resolve 'Microsoft.NETCore.App (>= 3.1.0)' for '.NETCoreApp,Version=v3.1'.
Errors in E:\TFS_Agents2017\...\s\askldf\asdfasdf.UnitTests.csproj
Unable to resolve 'Microsoft.NETCore.App (>= 3.1.0)' for '.NETCoreApp,Version=v3.1'.)
Packages failed to restore
Am I missing anything, do I need to add any other steps?
We cannot see the .NET Core SDK version 3.1.0 in the agent info . Please run the cmd dotnet –info
to check your local .NET Core SDK version and Runtime version, then open the build definition and add the task .NET Core SDK and .NET Core restore to restore the package.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.