Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A compatible SDK version was not found #10603

Closed
AnthonyMastrean opened this issue Feb 5, 2020 · 1 comment
Closed

A compatible SDK version was not found #10603

AnthonyMastrean opened this issue Feb 5, 2020 · 1 comment

Comments

@AnthonyMastrean
Copy link

AnthonyMastrean commented Feb 5, 2020

For local development, we're stuck on the last .NET Core SDK 2.2 version that supports VS2017 (that's 2.2.110 as of writing this).

I thought I'd use a global.json with the "latestPatch" strategy.

{
    "sdk": {
        "allowPrerelease": false,
        "rollForward": "latestPatch",
        "version": "2.2.110"
    }
}

But, now my CI pipeline can't build the same app using the official Docker image.

A compatible SDK version for global.json version: [2.2.110] from [/build/global.json] was not found
Did you mean to run dotnet SDK commands? Please install dotnet SDK from:
  https://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409

The Docker image uses the 2.2.207 version.

$ docker run --rm mcr.microsoft.com/dotnet/core/sdk:2.2 dotnet --info
.NET Core SDK (reflecting any global.json):
 Version:   2.2.207   
 Commit:    f7b16a2cd5

Runtime Environment:  
 OS Name:     debian  
 OS Version:  9       
 OS Platform: Linux   
 RID:         debian.9-x64
 Base Path:   /usr/share/dotnet/sdk/2.2.207/

Host (useful for support):
  Version: 2.2.8
  Commit:  b9aa1abc51

.NET Core SDKs installed:
  2.2.207 [/usr/share/dotnet/sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.2.8 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.2.8 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.2.8 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download

So, I switched the global.json to use "latestFeature". But, that still doesn't work. I don't know what I'm doing wrong and I, apparently, am not grokking the rules in this article.

https://docs.microsoft.com/en-us/dotnet/core/tools/global-json?tabs=netcore2x#matching-rules

@AnthonyMastrean
Copy link
Author

Wait a minute, is rollForward basically not supported in .NET Core 2.2? Is that what I'm reading? So, now I can have a global.json to control local development setup but I can't use the same in a Dockerfile. I basically have to ignore the global.json or make a custom SDK image?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant