Back

Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in DevOps and Agile by (29.3k points)

With the release of .NET Core 2.2, I expected to be able to build such projects in our Microsoft-hosted DevOps (Azure) pipeline. But the restore step fails, saying 2.2 is not supported:

2018-12-11T14:57:49.0856135Z        "D:\a\1\s\My.Project\My.Project.csproj" (Restore target) (1) ->

2018-12-11T14:57:49.0857867Z        "D:\a\1\s\MyProject.EntityFramework\MyProject.EntityFramework.csproj" (_GenerateRestoreGraphProjectEntry target) (2:3) ->

2018-12-11T14:57:49.0858029Z        (_CheckForUnsupportedNETCoreVersion target) -> 

2018-12-11T14:57:49.0858191Z          C:\Program Files\dotnet\sdk\2.1.402\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.TargetFrameworkInference.targets(137,5): error NETSDK1045: The current .NET SDK does not support targeting .NET Core 2.2.  Either target .NET Core 2.1 or lower, or use a version of the .NET SDK that supports .NET Core 2.2. [D:\a\1\s\MyProject.EntityFramework\MyProject.EntityFramework.csproj]

2018-12-11T14:57:49.0858287Z 

2018-12-11T14:57:49.0858338Z 

2018-12-11T14:57:49.0858398Z        "D:\a\1\s\My.Project\My.Project.csproj" (Restore target) (1) ->

2018-12-11T14:57:49.0858504Z        "D:\a\1\s\My.Project\My.Project.csproj" (_GenerateRestoreGraphProjectEntry target) (1:5) ->

2018-12-11T14:57:49.0858645Z          C:\Program Files\dotnet\sdk\2.1.402\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.TargetFrameworkInference.targets(137,5): error NETSDK1045: The current .NET SDK does not support targeting .NET Core 2.2.  Either target .NET Core 2.1 or lower, or use a version of the .NET SDK that supports .NET Core 2.2. [D:\a\1\s\My.Project\My.Project.csproj]

The project builds fine locally, so I think it is most likely that I'm missing something - especially as I come up with nothing on my internet search for similar errors.

Could it really be it is not supported yet?

1 Answer

0 votes
by (50.2k points)

After going through the question I came to an answer (ie. to check whether you have “.NET core installer” is added or not.)

There is a task “.NET Core Installer” that has to be added before the remote task and after adding and requesting version 2.2.100 to be installed, but first, you need the build passes.

It looks like a bit heavy process because firstly the hosted agent should have 2.2 installed already, and secondly Microsoft needs to surface things like this in the UI. then the project will run fine.

refer: https://dotnet.microsoft.com/platform/support/policy/dotnet-core

Welcome to Intellipaat Community. Get your technical queries answered by top developers!

28.4k questions

29.7k answers

500 comments

94k users

Browse Categories

...