-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fix detection of torn SDK #41907
Fix detection of torn SDK #41907
Conversation
@jaredpar shouldn't we set this whenever the two values are different? I know the SDK being newer is the majority of the issues but I believe you can still have issues the other way and wouldn't it be easier to do it whenever they were different? |
The issue is only with old msbuild + new SDK. Then we get an error like
We don't get that the other way around - with new msbuild and old SDK - that should work fine (the new compiler should be able to load the old generators/analyzers, it's backwards-compatible). It also seems better to use the latest compiler with hopefully fewer bugs than the old one. |
True but part of the rationale for this proposal is to ensure that |
This should probably be merged after #41951, because it looks like the current Toolset.Framework installation is broken even in simple cases. I created a new blazor app and trying to build it with msbuild 17.10 and SDK 9p5 (and this disjoint detection fixed), I'm getting the Toolset.Framework PackageReference without a Version specified - so it gets installed as 4.6.0 (the lowest available version) causing even more trouble (more errors about analyzers referencing newer compiler) than without it. |
If I understand correctly, the SDK is torn in case we have an old msbuild and new SDK. So e.g., if
$(_MSBuildVersionMajorMinor)
is17.10
and$(_BundledMSBuildVersionMajorMinor)
is17.11
then$(_IsDisjointMSBuildVersion)
should betrue
.Part of #41791.