Sdk: Dotnet SDK 2.1.401 has runtime version 2.1.3-servicing-26724-03

Created on 27 Aug 2018  路  28Comments  路  Source: dotnet/sdk

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 https://github.com/dotnet/cli/issues/9456.

Most helpful comment

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.

All 28 comments

Looks like https://github.com/dotnet/cli/pull/9889 will correct this. I suggest we retag following the merge.

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.

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 257cf7a4784cc925742ef4e2706e752ab1f578b0.

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

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.

Absolutely agree.

@leecow @vivmishra for updating the tic-toc.

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

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.

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

@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.

I have 15.9 preview 1 also installed

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: 91b1c13032

Runtime Environment:
OS Name: Windows
OS Version: 6.1.7601
OS Platform: Windows
RID: win7-x64
Base Path: C:Program Filesdotnetsdk2.1.401

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

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

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

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

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.

@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.

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

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

//Edit: Thanks for your solution.

Thanks @peterhuene.

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

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

@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.

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.

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 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!

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

@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>

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

@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

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

Was this page helpful?
0 / 5 - 0 ratings