Ensure errors from resolver about mismatched .NET Core SDK versions are surfaced correctly in VS and desktop msbuild
See original GitHub issueFrom @srivatsn on June 15, 2017 15:52
From @onovotny on June 15, 2017 15:40
Here’s the scenario:
Web project that has a global.json with a pinned SDK version.
Executing an msbuild /pp yields some interesting results for where the SDK’s are imported:
If the SDK version is 1.0.0-1.0.3 is:
The import of the Web SDK is from:
C:\Program Files\dotnet\sdk\1.0.0\Sdks\Microsoft.NET.Sdk.Web\Sdk\Sdk.props
But then the .NET Sdk is from:
C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\MSBuild\Sdks\Microsoft.NET.Sdk\Sdk\Sdk.props
If the SDK version is 1.0.4, both SDK’s come from the C:\Program Files\dotnet\sdk\1.0.4\Sdks\
directory.
Seems like if 1.0.4
is the min version of the SDK that will work correctly with 15.3, then if VS sees an older pinned version, it should use the upgrade wizard functionality to bump the min SDK version to 1.0.4 so things don’t act strangely for users unexpectedly.
Copied from original issue: dotnet/project-system#2450
Copied from original issue: dotnet/sdk#1348
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:23 (17 by maintainers)
Top GitHub Comments
The remaining issues are tracked as follows:
Removing fallback to 1.1: https://github.com/dotnet/cli/issues/6795 Project system not showing resolver errors: https://github.com/dotnet/project-system/issues/2467
cc @davidfowl - this is the issue we were talking about. VS doesn’t show useful errors if the sdk from global.json cannot be found.