-
Notifications
You must be signed in to change notification settings - Fork 418
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
Check for MSBuild version is higher than required by the .NET SDK #1875
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you for adding this
@@ -64,7 +64,8 @@ public CompositionHost Build() | |||
// This is for tests, where the MSBuild instance may be registered early. | |||
if (msbuildLocator.RegisteredInstance == null) | |||
{ | |||
msbuildLocator.RegisterDefaultInstance(logger); | |||
var dotNetInfo = dotNetCliService.GetInfo(workingDirectory); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure if it's possible to have a different global.json with different SDK versions per project - but I think it is not, so it should be fine to run this against the startup directory
|
||
var version = dotNetInfo.SdkVersion; | ||
var sdksPath = dotNetInfo.SdksPath; | ||
var minimumVersionPath = Path.Combine(sdksPath, version.ToNormalizedString(), "minimumMSBuildVersion"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is really there?! that's new to me!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was happy to find it =)
Provide a warning when the discovered MSBuild version is lower than the minimumMSBuildVersion supported by the configured SDK.