-
Notifications
You must be signed in to change notification settings - Fork 420
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 MSBuild version mismatch with new SDKs #1883
Conversation
var msbuildRefLibraries = new [] | ||
{ | ||
"Microsoft.Build.Tasks.v4.0", | ||
"Microsoft.Build.Tasks.v12.0", | ||
"Microsoft.Build.Utilities.v4.0", |
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.
There are no NuGet packages for these but we can still copy them from the Mono MSBuild folder.
<PackageReference Update="NuGet.Packaging" Version="$(NuGetPackageVersion)" /> | ||
<PackageReference Update="NuGet.Packaging.Core" Version="$(NuGetPackageVersion)" /> | ||
<PackageReference Update="NuGet.ProjectModel" Version="$(NuGetPackageVersion)" /> | ||
<PackageReference Update="NuGet.Versioning" Version="$(NuGetPackageVersion)" /> |
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 only seemed to be an issue in the Linux build surprisingly
SendMessage(MessageType.GetTestRunnerProcessStartInfoForRunSelected, | ||
new | ||
{ | ||
TestCases = testCases, | ||
DebuggingEnabled = true, | ||
RunSettings = LoadRunSettingsOrDefault(runSettings, targetFrameworkVersion) | ||
}); |
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 should have been removed when I extracted out the GetTestRunningProcessStartInfo method
private const string DotNetVersion = "3.1.401"; | ||
private int Major { get; } | ||
private int Minor { get; } | ||
private int Patch { get; } | ||
private string Release { get; } | ||
|
||
public DotNetCliServiceFacts(ITestOutputHelper output) | ||
: base(output) | ||
{ | ||
var version = SemanticVersion.Parse(DotNetVersion); | ||
Major = version.Major; | ||
Minor = version.Minor; | ||
Patch = version.Patch; | ||
Release = version.Release; |
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 should make future SDK updates easier since the version string can be updated with a replace all.
The 3.1.401 SDK's minimumMSBuildVersion is 16.7.0. The latest stable and preview versions of Mono ship with 16.6.0. This causes the DotNet.MSBuildSDKResolver to no longer find the sdks needed to load projects.
Possibilities for working around this:
Since we already ship the MSBuild from tools/packages on the Windows platform, this may be the easiest path to take.
Fixes dotnet/vscode-csharp#3951