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

Dotnet SDK 2.1.401 has runtime version 2.1.3-servicing-26724-03 #9897

Closed
cf-buildpacks-eng opened this Issue Aug 27, 2018 · 28 comments

Comments

Projects
None yet
@cf-buildpacks-eng

cf-buildpacks-eng commented Aug 27, 2018

Steps to reproduce

Checkout this repo at tag v2.1.401
Run ./build.sh /t:Compile
Open shared/Microsoft.NETCore.App directory from build output

Expected behavior

We see a folder named 2.1.3, and can restore/publish/run applications against framework 2.1.3.

Actual behavior

We see a folder named 2.1.3-servicing-26724-03. This doesn't seem to be the case when following the steps for installing (vs building from source): https://www.microsoft.com/net/download/linux-package-manager/ubuntu14-04/sdk-current

Supplying this value in the .csproj produces the following warning:

/tmp/app/msbuild_self_contained.csproj : warning NU1603: msbuild_self_contained depends on Microsoft.NETCore.App (>= 2.1.3-servicing-26724-03) but Microsoft.NETCore.App 2.1.3-servicing-26724-03 was not found. An approximate best match of Microsoft.NETCore.App 2.1.3 was resolved.
   2018-08-27T10:31:35.18-0400 [STG/0] OUT        /tmp/app/msbuild_self_contained.csproj : error : NETSDK1061: The project was restored using Microsoft.NETCore.App version 2.1.3, but with current settings, version 2.1.3-servicing-26724-03 would be used instead. To resolve this issue, make sure the same settings are used for restore and for subsequent operations such as build or publish. Typically this issue can occur if the RuntimeIdentifier property is set during build or publish but not during restore. For more information, see https://aka.ms/dotnet-runtime-patch-selection.

This seems to be similar to #9456.

@cf-buildpacks-eng cf-buildpacks-eng changed the title from Dotnet SDK 2.1.401 now has runtime version 2.1.3-servicing-26724-03 to Dotnet SDK 2.1.401 has runtime version 2.1.3-servicing-26724-03 Aug 27, 2018

@peterhuene peterhuene added this to the 2.1.4xx milestone Aug 27, 2018

@peterhuene

This comment has been minimized.

Member

peterhuene commented Aug 27, 2018

Looks like #9889 will correct this. I suggest we retag following the merge.

@livarcocc

This comment has been minimized.

Member

livarcocc commented Aug 27, 2018

We shouldn't re-tag, as the official 401 build came out of the commit with the marked SHA, but because it was a prodcon build, it has different dependencies. Our agreement is to create a second tag, v.2.1.401+dependencies that contains the updated dependencies.

@livarcocc

This comment has been minimized.

Member

livarcocc commented Aug 27, 2018

Unfortunately, I don't think we will be able to do that, because the repo has moved forward quite a bit since we tagged for 401.

At this point, I would suggest using the tag and then cherry-picking 257cf7a.

We will try and get it right for 402, by updating the dependencies right away.

@peterhuene

This comment has been minimized.

Member

peterhuene commented Aug 27, 2018

Yeah, I think we should update the tick-tock to include ensuring the dependencies are updated before tagging, either via a maestro merge or manually. I'd hate to have this continue to happen to our community partners that build their packages from source tags.

@livarcocc

This comment has been minimized.

Member

livarcocc commented Aug 27, 2018

Absolutely agree.

@leecow @vivmishra for updating the tic-toc.

@s-trooper

This comment has been minimized.

s-trooper commented Aug 29, 2018

i've just updated VS2017.8.2 and run in this? issue. I can't compile my code anymore!

To reproduce (dotnet.exe --version = 2.1.401):

1. dotnet new console
2. dotnet.exe build --runtime win-x86
3. Build FAILED.

c:\Dev\Local\src\Sandbox\dotnet\xxx\xxx.csproj : warning NU1603: xxx depends on Microsoft.NETCore.App (>= 2.1.3-servicing-26724-03) but Microsoft.NETCore.App 2.1.3-servicing-26724-03 was not found. An approximate best match of Microsoft.NETCore.App 2.1.3 was resolved.
c:\Dev\Local\src\Sandbox\dotnet\xxx\xxx.csproj : warning NU1603: xxx depends on Microsoft.NETCore.App (>= 2.1.3-servicing-26724-03) but Microsoft.NETCore.App 2.1.3-servicing-26724-03 was not found. An approximate best match of Microsoft.NETCore.App 2.1.3 was resolved.
c:\Dev\Local\src\Sandbox\dotnet\xxx\xxx.csproj : error : NETSDK1061: The project was restored using Microsoft.NETCore.App version 2.1.3, but with current settings, version 2.1.3-servicing-26724-03 would be used instead. To resolve this issue, make sure the same settings are used for restore and for subsequent operations such as build or publish. Typically this issue can occur if the RuntimeIdentifier property is set during build or publish but not during restore. For more information, see https://aka.ms/dotnet-runtime-patch-selection.
    2 Warning(s)
    1 Error(s)

Edit:
i have solved my Problem by uninstall all of dotnet core and it related folders, and then install SDK 2.1.401 anew

@joshuadavidson

This comment has been minimized.

joshuadavidson commented Aug 29, 2018

I too ran into the following error after I updated to Visual Studio 2017.8.2 last night:

NETSDK1061: The project was restored using Microsoft.NETCore.App version 2.1.3, but with current settings, version 2.1.3-servicing-26724-03 would be used instead. To resolve this issue, make sure the same settings are used for restore and for subsequent operations such as build or publish. Typically this issue can occur if the RuntimeIdentifier property is set during build or publish but not during restore. For more information, see https://aka.ms/dotnet-runtime-patch-selection.

Simply uninstalling and reinstalling the .NET Core SDK - 2.1.401 resolved it for me as well.

@mjjames

This comment has been minimized.

mjjames commented Aug 29, 2018

I tried a repair install and that didn't work, but uninstall, redownload and install fixed it. Kind of annoying that my builds broke :(

@peterhuene

This comment has been minimized.

Member

peterhuene commented Aug 29, 2018

@s-trooper @joshuadavidson @mjjames are any of you on the preview channel for Visual Studio updates or had previously installed preview versions of the SDK?

Given this issue has more to do about our release tagging so that developers and community package maintainers (primarily for Linux distros) can build with the same dependencies as our official builds, which should not have any references to 2.1.3-servicing-26724-03, I'm a bit surprised that any of you are running into this issue following the VS update to 2.1.401.

@mjjames

This comment has been minimized.

mjjames commented Aug 29, 2018

I have 15.9 preview 1 also installed

@spechacek

This comment has been minimized.

spechacek commented Aug 29, 2018

I ran the vs2017 update just a little bit ago to get to 15.8.2 and ran into this issue as well.

.NET Core SDK (reflecting any global.json):
Version: 2.1.401
Commit: 91b1c13

Runtime Environment:
OS Name: Windows
OS Version: 6.1.7601
OS Platform: Windows
RID: win7-x64
Base Path: C:\Program Files\dotnet\sdk\2.1.401\

Host (useful for support):
Version: 2.1.3-servicing-26724-03
Commit: 124038c13e

.NET Core SDKs installed:
1.0.3 [C:\Program Files\dotnet\sdk]
1.0.4 [C:\Program Files\dotnet\sdk]
1.1.0 [C:\Program Files\dotnet\sdk]
2.0.0 [C:\Program Files\dotnet\sdk]
2.0.2 [C:\Program Files\dotnet\sdk]
2.0.3 [C:\Program Files\dotnet\sdk]
2.1.2 [C:\Program Files\dotnet\sdk]
2.1.4 [C:\Program Files\dotnet\sdk]
2.1.100 [C:\Program Files\dotnet\sdk]
2.1.101 [C:\Program Files\dotnet\sdk]
2.1.102 [C:\Program Files\dotnet\sdk]
2.1.103 [C:\Program Files\dotnet\sdk]
2.1.104 [C:\Program Files\dotnet\sdk]
2.1.200 [C:\Program Files\dotnet\sdk]
2.1.201 [C:\Program Files\dotnet\sdk]
2.1.202 [C:\Program Files\dotnet\sdk]
2.1.301 [C:\Program Files\dotnet\sdk]
2.1.400 [C:\Program Files\dotnet\sdk]
2.1.401 [C:\Program Files\dotnet\sdk]

.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 1.0.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 1.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 1.1.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 1.1.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.3-servicing-26724-03 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

I haven't tried un/reinstalling the sdk yet. But through normal VS update, this is what happened.

@peterhuene

This comment has been minimized.

Member

peterhuene commented Aug 29, 2018

It's come to my attention that VS 15.8.2 did not include the correct, final build of the 2.1.401 SDK. We are working on resolving this issue. In the meantime, uninstalling the 2.1.401 SDK installed by Visual Studio and installing the SDK from the .NET Downloads site should correct the issue.

@livarcocc

This comment has been minimized.

Member

livarcocc commented Aug 29, 2018

@andreaskoepf We understand that this is frustrating, but that's not the appropriate tone for this forum. I guarantee you that this was not intentional and we are working on both addressing this issue and improving our processes so this does not happen again.

Once again, we appreciate that it is frustrating to have your builds broken or your development cadence interrupted. We are working to fix and prevent it from repeating.

@spechacek

This comment has been minimized.

spechacek commented Aug 29, 2018

@peterhuene I did what you suggested and everything is working now. Thanks for your help!

@spixy

This comment has been minimized.

spixy commented Sep 2, 2018

Maybe you should finally separate SDK updates from Visual Studio updates?
(Android Studio has it)

//Edit: Thanks for your solution.

@NeilCross

This comment has been minimized.

NeilCross commented Sep 3, 2018

Thanks @peterhuene.

@NinjaKitt3n

This comment has been minimized.

NinjaKitt3n commented Sep 7, 2018

This is showing as fixed with 15.8.3 however - still had to uninstall and re-install 2.1.401 SDK to successfully publish.

@livarcocc

This comment has been minimized.

Member

livarcocc commented Sep 7, 2018

That's correct. For people who got the wrong version, uninstalling and installing the correct one is the appropriate thing to do.

@dasMulli

This comment has been minimized.

Contributor

dasMulli commented Sep 7, 2018

@livarcocc In my opinion, a 2.1.402 needs to be pushed out in a VS update to complete solve the issue for all users.
Only a version increment will insure everyone is using correct builds and the VS installer will actually update the installed SDK version. The current 15.8.3 update does nothing (!) on affected machines that had the bad 15.8.2 version installed.

@livarcocc

This comment has been minimized.

Member

livarcocc commented Sep 7, 2018

2.1.402 is being pushed to an update of VS. However, we couldn't put it in 15.8.3 because it was already done and it contains things that we couldn't put it out in the wild sooner.

@JohnGoldsmith

This comment has been minimized.

JohnGoldsmith commented Sep 10, 2018

Uninstall and reinstall of 2.1.401 SDK (using VS 15.8.3) solved for me too - thank you. Will add my initial error message here so that others might get here quicker than I did....

dotnet exe has exited with code -2147450730 0x80008096

@livarcocc livarcocc closed this Sep 10, 2018

@ameyer-pivotal

This comment has been minimized.

ameyer-pivotal commented Sep 12, 2018

@livarcocc It seems a similar issue has occurred for sdk 2.1.402. Is the v2.1.402+dependencies tag still on the way, or was 2.1.402 supposed to give a reproducible build out of the box? Thanks for your help in this!

@livarcocc

This comment has been minimized.

Member

livarcocc commented Sep 12, 2018

See #9983.

@jcbritobr

This comment has been minimized.

jcbritobr commented Sep 15, 2018

This is happening to me using 402 and ubuntu 16.04:
NETSDK1061: The project was restored using Microsoft.NETCore.App version 2.1.4,

@livarcocc

This comment has been minimized.

Member

livarcocc commented Sep 15, 2018

@jcbritobr This is a different issue from the one reported here. Your issue is regarding implicit versions for framework dependent apps and self-contained apps. If seems like you might be publishing your self-contained app without letting implicit restore run, which leads to the message above.

If you do not want your self-contained app to target the latest runtime, you can try setting <TargetLatestRuntimePatch>false</TargetLatestRuntimePatch>

@GyuuKey

This comment has been minimized.

GyuuKey commented Sep 29, 2018

Version 2.1.402 of DotNET Core SDK also has this issue...

@dasMulli

This comment has been minimized.

Contributor

dasMulli commented Sep 29, 2018

@GyuuKey which issue? the one this filed issue is about should be fixed, at least I didn't observe it.
if you mean the NETSDK1061 error, that's currently by design and you need change one of your projects or the way you publish apps.
Also see https://docs.microsoft.com/en-us/dotnet/core/deploying/runtime-patch-selection

@fizxmike

This comment has been minimized.

fizxmike commented Nov 5, 2018

In my case (windows x64 self-contained) I had to specify <RuntimeIdentifier>win-x64</RuntimeIdentifier> in my .csproj rather than specifying it in CI config.

Unfortunately, Azure DevOps does not allow one to set any command line parameters on dotnet restore task:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment