Skip to content

Conversation

@JoeRobich
Copy link
Member

Provide a warning when the discovered MSBuild version is lower than the minimumMSBuildVersion supported by the configured SDK.

@JoeRobich JoeRobich changed the title Check for MSBuild versiosn higher than required by the .NET SDK Check for MSBuild version is higher than required by the .NET SDK Aug 6, 2020
Copy link
Member

@filipw filipw left a 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

if (msbuildLocator.RegisteredInstance == null)
{
msbuildLocator.RegisterDefaultInstance(logger);
var dotNetInfo = dotNetCliService.GetInfo(workingDirectory);
Copy link
Member

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");
Copy link
Member

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!

Copy link
Member Author

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 =)

@filipw filipw merged commit 6a34f6e into OmniSharp:master Aug 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants