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

microsoft/dotnet:2.0-sdk image shows version 2.1.2 #1150

Closed
Deren-Liao opened this issue Dec 12, 2017 · 22 comments
Closed

microsoft/dotnet:2.0-sdk image shows version 2.1.2 #1150

Deren-Liao opened this issue Dec 12, 2017 · 22 comments
Assignees

Comments

@Deren-Liao
Copy link

I created a docker image based on microsoft/dotnet:2.0-sdk
The dotnet --version command shows me it is 2.1.2

Am I missing something? I just want 2.0.0 dotnet core sdk , what base image should I use?

@Petermarcu
Copy link
Member

@KathleenDollard @richlander

dotnet --version isn't very intuitive and neither are the version numbers so I understand the confusion. There is work happening to try to fix some of that. At a high level though, the 2.1.2 SDK contains .NET Core 2.0.3 runtime so you have the right thing.

@Deren-Liao
Copy link
Author

Deren-Liao commented Dec 12, 2017

When I run dotnet test, dotnet build etc, or even dotnet --version,
I got an error as following.

What's the possible fix? (I need to keep the solution with version 2.0.0 )

~/git/gax-dotnet# dotnet --version
The specified SDK version [2.0.0] from global.json [/root/git/gax-dotnet/global.json] not found; install specified SDK version
Did you mean to run dotnet SDK commands? Please install dotnet SDK from:
http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409

@michaldudak
Copy link

@Petermarcu Are there any release notes for 2.1.2? There's nothing on https://github.com/dotnet/core/blob/master/release-notes/download-archive.md. Why did the minor version go up?

@Petermarcu
Copy link
Member

@leecow @livarcocc to point to release notes. I believe the minor version went up because the SDK took the the new C# compiler to support C# 7.2.

@leecow
Copy link
Member

leecow commented Dec 13, 2017

I don't have the usual, full featured release notes. Highlights included in https://github.com/dotnet/cli/releases/tag/v2.1.2

@Deren-Liao
Copy link
Author

Deren-Liao commented Dec 13, 2017

Hi people, Please help on my issues. Do you have the old dotnet core 2.0.0 sdk docker image that I can use? Or do you have work around to this "specified SDK version not found" problem?

@Petermarcu
Copy link
Member

Is there a reason you are specifying 2.0.0 in your global.json?

@Petermarcu
Copy link
Member

@richlander I assume old container configurations are still available by name?

@Deren-Liao
Copy link
Author

Yes, some projects stick to version 2.0.0

@Petermarcu
Copy link
Member

Is there a reason they have to stick to the 2.0.0 sdk? That is not the same as the 2.0.0 runtime. The 2.1.2 SDK is the latest stable release of the SDK that targets the 2.0.0 runtime. We recommend people moving forward on SDK's while still targeting 2.0 as the platform version.

@Deren-Liao
Copy link
Author

global.json specifies 2.0.0. If SDK 2.1.2 works, that's great. Yes, only runtime, it's okay if sdk is 2.1.2. But I got error while trying to run dotnet command.

~/git/gax-dotnet# dotnet --version
The specified SDK version [2.0.0] from global.json [/root/git/gax-dotnet/global.json] not found; install specified SDK version
Did you mean to run dotnet SDK commands? Please install dotnet SDK from:
http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409

@Petermarcu
Copy link
Member

yeah, you will need to remove the entry from global.json that says you can only use the 2.0.0 SDK. That feature is really only for people who are broken for some reason with the newer SDK and need to lock back until we get a fix out.

@ghost
Copy link

ghost commented Dec 14, 2017

Glad to see that im not the only one getting confused, looking at https://github.com/dotnet/corefx/issues/25911, and other issues in dotnet/sdk and dotnet/cli and dotnet/core-setup.. i can say that it's not a good idea for folks who are stubborn for this versioning mess.

".NET Core 2.1 is going to be massive!" someone said, "scheduled to be released sometime in 2018 Q1"

but lets check dotnet --version after updating VS2017 to 15.5 and we already have 2.1.2! Ah, lets check release notes in dotnet/core repo for v2.1.2 and find yourself confused, because it is too obvious that dotnet-version command is pure ... fubar!

dotnet-core is the product here that everyone is getting familiar with and we should see version of that in the output of dotnet --version. For more information on nitty-gritty of every last tool installed with it, check dotnet --versions or dotnet --info (like VS about dialog).

In CLI repo, some people were considering it as a breaking changes for tools and humans, who are already relying on the console output of current releases. IMO this is a BUG that needs to be fixed as soon as possible, else there will always be some guy or gal asking these wtf-questions..

@karelz, @richlander, @danmosemsft, hopefully this comment, this thread and dozens of other issues in the said repos and Twitter and the internet will clarify the confusion caused by the output of dotnet --version command. If you guys still think it makes perfect sense, lets open a public poll and count who else is not confused. :)

Please reconsider and together love this product called .NET Core!

@Deren-Liao
Copy link
Author

It's very inconvenient and sometimes not acceptable that you change the binaries of the image with same tag. As a user/developer, if I want to use higher version, I'll choose tag :2.1.2-sdk. But if it is 2.0-sdk, I would expect it stays same with the old bits.
In my case, I had to build an image by installing 2.0.0 sdk myself.

@richlander
Copy link
Member

Some Docker repos product a tags-details.md that provide a history of changes. We aspire to that do that, but don't do that yet. This would be useful to determine tags that are still available but are no longer published on our README. For now, you have to guess. For example, microsoft/dotnet:2.0.0-sdk will likely work for you. Make sense?

@dasMulli
Copy link

The issue here is more about runtime vs sdk version, which could lead to even more confusion with docker tags.
e.g. microsoft/dotnet:2.0.4-sdk-2.1.3 would be a tag that includes the current versions.

@dasMulli
Copy link

dasMulli commented Dec 15, 2017

And I guess the root issue is still that global.json doesn't provide good way to specify a range/minimum/wildcard version https://github.com/dotnet/core-setup/issues/679
I guess most ppl would be fine to have a global.json that just contains an info like "use any 2.1+ SDK because we use C# 7.2 features" instead of pinning a specific version (2.1.3).

@richlander
Copy link
Member

I see. Yes, our SDK/Runtime versioning is confusing. We're continuing to talk about that to look for a better model. You are right, with your example, that shows both the runtime and SDK versions.

We were also talking yesterday about specifying a min tools version. Your C# 7.2 example is a poster-child use-case. We don't have a good story for that today. This is something for you to think about @KathleenDollard.

@dasMulli
Copy link

dasMulli commented Dec 27, 2017

Similar issue popped up on StackOverflow when a global.json conflicted with a newer version of a docker image: https://stackoverflow.com/questions/47983402/docker-running-dotnet-publish-o-output-results-in-a-nonzero-error-on-cli/47995278

@KathleenDollard
Copy link
Contributor

Sadly we have a couple of overlapping versioning issues and are working on an overall strategy. We're trying to get the right balance of meeting the expectations people have dependencies on (not breaking people) and reducing the confusion. We know we don't have it right.

--version is a challenge. There might be multiple runtimes on the machine. If there is one number output - the SDK is what is running is accurate and there is one single number. But I'm aware that this is not what many people mean to be asking when they type --version

I'm currently leaning to a complex result - the SDK version and the installed runtimes. I don't want to turn this into --info, but when a human types --version the CLI simply can't know what they want from the request.

This will break people, so it's a hard call.

@Petermarcu
Copy link
Member

@KathleenDollard do you think we can link to the current proposed fix/spec for this and close this issue?

@KathleenDollard
Copy link
Contributor

Yes. I don't seem able to close this issue, but the link is dotnet/designs#29

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

7 participants