Skip to content

Commit

Permalink
Update Visual Studio Version to 17.0 (dotnet#6361)
Browse files Browse the repository at this point in the history
* branding update (dotnet#6321)

branding update

* Additional 17.0 branding/internal updates

* Update src/Utilities/ToolLocationHelper.cs

Co-authored-by: Rainer Sigwald <raines@microsoft.com>

* Update vsix

Co-authored-by: Rainer Sigwald <raines@microsoft.com>
Co-authored-by: Ben Villalobos <4691428+BenVillalobos@users.noreply.github.com>
  • Loading branch information
3 people committed May 6, 2021
1 parent b02f8de commit d07c47a
Show file tree
Hide file tree
Showing 12 changed files with 60 additions and 17 deletions.
Expand Up @@ -321,11 +321,11 @@ public enum TargetDotNetFrameworkVersion
Version461 = 8,
Version452 = 9,
Version462 = 10,
VersionLatest = 10,
Version47 = 11,
Version471 = 12,
Version472 = 13,
Version48 = 14,
VersionLatest = 14,
Latest = 9999,
}
public partial class TargetPlatformSDK : System.IEquatable<Microsoft.Build.Utilities.TargetPlatformSDK>
Expand Down Expand Up @@ -599,8 +599,8 @@ public enum VisualStudioVersion
Version120 = 2,
Version140 = 3,
Version150 = 4,
VersionLatest = 4,
Version160 = 5,
Version170 = 6,
VersionLatest = 6,
}
}
Expand Up @@ -166,11 +166,11 @@ public enum TargetDotNetFrameworkVersion
Version461 = 8,
Version452 = 9,
Version462 = 10,
VersionLatest = 10,
Version47 = 11,
Version471 = 12,
Version472 = 13,
Version48 = 14,
VersionLatest = 14,
Latest = 9999,
}
public partial class TargetPlatformSDK : System.IEquatable<Microsoft.Build.Utilities.TargetPlatformSDK>
Expand Down Expand Up @@ -433,8 +433,8 @@ public enum VisualStudioVersion
Version120 = 2,
Version140 = 3,
Version150 = 4,
VersionLatest = 4,
Version160 = 5,
Version170 = 6,
VersionLatest = 6,
}
}
6 changes: 3 additions & 3 deletions src/Build.UnitTests/BuildEnvironmentHelper_Tests.cs
Expand Up @@ -307,9 +307,9 @@ public void BuildEnvironmentDetectsVisualStudioByMSBuildProcessAmd64()
[Theory]
[SkipOnTargetFramework(TargetFrameworkMonikers.Netcoreapp, "No Visual Studio install for netcore")]
[PlatformSpecific(TestPlatforms.Windows)]
[InlineData("16.0", true)]
[InlineData("16.3", true)]
[InlineData("15.0", false)]
[InlineData("17.0", true)]
[InlineData("17.3", true)]
[InlineData("16.0", false)]
public void BuildEnvironmentDetectsVisualStudioFromSetupInstance(string visualStudioVersion, bool shouldBeValid)
{
using (var env = new EmptyVSEnviroment())
Expand Down
1 change: 1 addition & 0 deletions src/MSBuild/app.amd64.config
Expand Up @@ -64,6 +64,7 @@
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>

<!-- Pull plugins that reference SCI up to our version in case they depended on our copy of the older version -->
<dependentAssembly>
<assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
Expand Down
2 changes: 1 addition & 1 deletion src/Package/MSBuild.VSSetup/files.swr
Expand Up @@ -21,7 +21,7 @@ vs.relatedProcessFiles

folder InstallDir:\MSBuild\Current
file source=$(X86BinPath)Microsoft.Common.props
file source=$(X86BinPath)Microsoft.VisualStudioVersion.v16.Common.props
file source=$(X86BinPath)Microsoft.VisualStudioVersion.v17.Common.props
file source=$(ThirdPartyNotice)

folder InstallDir:\MSBuild\Current\Bin
Expand Down
2 changes: 1 addition & 1 deletion src/Shared/BuildEnvironmentHelper.cs
Expand Up @@ -15,7 +15,7 @@ internal class BuildEnvironmentHelper
{
// Since this class is added as 'link' to shared source in multiple projects,
// MSBuildConstants.CurrentVisualStudioVersion is not available in all of them.
private const string CurrentVisualStudioVersion = "16.0";
private const string CurrentVisualStudioVersion = "17.0";

// MSBuildConstants.CurrentToolsVersion
private const string CurrentToolsVersion = "Current";
Expand Down
4 changes: 2 additions & 2 deletions src/Shared/Constants.cs
Expand Up @@ -53,7 +53,7 @@ internal static class MSBuildConstants
/// <summary>
/// The most current Visual Studio Version known to this version of MSBuild.
/// </summary>
internal const string CurrentVisualStudioVersion = "16.0";
internal const string CurrentVisualStudioVersion = "17.0";

/// <summary>
/// The most current ToolsVersion known to this version of MSBuild.
Expand All @@ -70,7 +70,7 @@ internal static class MSBuildConstants
/// <summary>
/// Current version of this MSBuild Engine assembly in the form, e.g, "12.0"
/// </summary>
internal const string CurrentProductVersion = "16.0";
internal const string CurrentProductVersion = "17.0";

/// <summary>
/// Symbol used in ProjectReferenceTarget items to represent default targets
Expand Down
19 changes: 19 additions & 0 deletions src/Shared/FrameworkLocationHelper.cs
Expand Up @@ -307,6 +307,25 @@ internal static class FrameworkLocationHelper
dotNetFrameworkVersion472,
dotNetFrameworkVersion48,
}),

// VS17
new VisualStudioSpec(visualStudioVersion170, "NETFXSDK\\{0}", "v10.0", "InstallationFolder", new []
{
dotNetFrameworkVersion11,
dotNetFrameworkVersion20,
dotNetFrameworkVersion35,
dotNetFrameworkVersion40,
dotNetFrameworkVersion45,
dotNetFrameworkVersion451,
dotNetFrameworkVersion452,
dotNetFrameworkVersion46,
dotNetFrameworkVersion461,
dotNetFrameworkVersion462,
dotNetFrameworkVersion47,
dotNetFrameworkVersion471,
dotNetFrameworkVersion472,
dotNetFrameworkVersion48,
}),
};

#if FEATURE_WIN32_REGISTRY
Expand Down
7 changes: 5 additions & 2 deletions src/Tasks/Microsoft.Build.Tasks.csproj
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<Import Project="..\Shared\FileSystemSources.proj" />
<Import Project="..\Shared\DebuggingSources.proj" />
Expand Down Expand Up @@ -91,7 +91,7 @@
<Compile Include="..\Shared\NGen.cs">
<Link>NGen.cs</Link>
</Compile>
<Compile Include="..\Shared\IConstrainedEqualityComparer.cs"/>
<Compile Include="..\Shared\IConstrainedEqualityComparer.cs" />
<Compile Include="..\Shared\PropertyParser.cs">
<Link>PropertyParser.cs</Link>
<ExcludeFromStyleCop>True</ExcludeFromStyleCop>
Expand Down Expand Up @@ -794,6 +794,9 @@
<Content Include="Microsoft.VisualStudioVersion.v16.Common.props">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Microsoft.VisualStudioVersion.v17.Common.props">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<!-- Resource Files -->
<EmbeddedResource Include="Resources\Strings.resx">
<LogicalName>$(AssemblyName).Strings.resources</LogicalName>
Expand Down
20 changes: 20 additions & 0 deletions src/Tasks/Microsoft.VisualStudioVersion.v17.Common.props
@@ -0,0 +1,20 @@
<!--
***********************************************************************************************
Microsoft.VisualStudio.v17.Common.props
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
Copyright (C) Microsoft Corporation. All rights reserved.
***********************************************************************************************
-->

<Project>

<PropertyGroup>
<VisualStudioVersion>17.0</VisualStudioVersion>
<VSToolsPath>$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>

</Project>
2 changes: 1 addition & 1 deletion src/Utilities.UnitTests/ToolLocationHelper_Tests.cs
Expand Up @@ -2853,7 +2853,7 @@ private static IEnumerable<VisualStudioVersion> EnumVisualStudioVersions()

private static IEnumerable<TargetDotNetFrameworkVersion> EnumDotNetFrameworkVersions()
{
for (TargetDotNetFrameworkVersion dotNetVersion = TargetDotNetFrameworkVersion.Version11; dotNetVersion <= TargetDotNetFrameworkVersion.Latest; ++dotNetVersion)
for (TargetDotNetFrameworkVersion dotNetVersion = TargetDotNetFrameworkVersion.Version11; dotNetVersion <= TargetDotNetFrameworkVersion.VersionLatest; ++dotNetVersion)
{
yield return dotNetVersion;
}
Expand Down
6 changes: 3 additions & 3 deletions src/Utilities/ToolLocationHelper.cs
Expand Up @@ -109,7 +109,7 @@ public enum TargetDotNetFrameworkVersion
/// breaking change. Use 'Latest' if possible, but note the
/// compatibility implications.
/// </summary>
VersionLatest = Version462,
VersionLatest = Version48,

/// <summary>
/// Sentinel value for the latest version that this version of MSBuild is aware of. Similar
Expand Down Expand Up @@ -160,15 +160,15 @@ public enum VisualStudioVersion
Version160,

/// <summary>
/// Visual Studio "Dev17"
/// Visual Studio 2022 (Dev17)
/// </summary>
Version170,

// keep this up-to-date; always point to the last entry.
/// <summary>
/// The latest version available at the time of release
/// </summary>
VersionLatest = Version150
VersionLatest = Version170
}

/// <summary>
Expand Down

0 comments on commit d07c47a

Please sign in to comment.