From 8252fc4d04e507264ba4b59c26862e5bb5c51c12 Mon Sep 17 00:00:00 2001 From: Mikayla Hutchinson Date: Tue, 17 Apr 2018 13:21:24 -0400 Subject: Simplify sln format definitions From 2012 onwards, the solution format is unchanged, so there's no need to define a 2017 format. The ToolsVersion defined by the format is irrelevant except to new project creation with the old template system. The build engine will always be the latest MSBuild version. Change the comment added to new files to match VS2017. --- .../MSBuildFileFormat.cs | 43 +++------------------- 1 file changed, 5 insertions(+), 38 deletions(-) (limited to 'main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/MSBuildFileFormat.cs') diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/MSBuildFileFormat.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/MSBuildFileFormat.cs index 1205d74a78..d3084e8e19 100644 --- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/MSBuildFileFormat.cs +++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/MSBuildFileFormat.cs @@ -32,7 +32,6 @@ using System.Collections.Generic; using System.IO; using MonoDevelop.Core; using MonoDevelop.Core.Assemblies; -using MonoDevelop.Projects.Extensions; using System.Threading.Tasks; using System.Linq; @@ -51,17 +50,13 @@ namespace MonoDevelop.Projects.MSBuild public static readonly MSBuildFileFormat VS2008 = new MSBuildFileFormatVS08 (); public static readonly MSBuildFileFormat VS2010 = new MSBuildFileFormatVS10 (); public static readonly MSBuildFileFormat VS2012 = new MSBuildFileFormatVS12 (); - public static readonly MSBuildFileFormat VS2017 = new MSBuildFileFormatVS15 (); + + [Obsolete("This is the same as VS2012")] + public static readonly MSBuildFileFormat VS2017 = VS2012; public static IEnumerable GetSupportedFormats () { - // Return VS2012 format first since this is the default format used. - // If VS2017 is returned first then since it uses the same solution file - // version it would be used instead. This would cause the tools version for - // new projects added to an existing solution to be changed to 15.0 instead - // of using 4.0 which is the current default. yield return VS2012; - yield return VS2017; yield return VS2010; yield return VS2008; yield return VS2005; @@ -367,40 +362,12 @@ namespace MonoDevelop.Projects.MSBuild } public override string ProductDescription { - get { return "Visual Studio 2012"; } - } - - protected override bool SupportsToolsVersion (string version) - { - return version == "4.0" || version == "12.0" || version == "14.0"; - } - } - - class MSBuildFileFormatVS15: MSBuildFileFormat - { - public override string Id { - get { return "MSBuild15"; } - } - - public override Version Version { - get { return new Version ("2017"); } - } - - public override string DefaultToolsVersion { - get { return "15.0"; } - } - - public override string SlnVersion { - get { return "12.00"; } - } - - public override string ProductDescription { - get { return "Visual Studio 2017"; } + get { return "Visual Studio 15"; } } protected override bool SupportsToolsVersion (string version) { - return version == "15.0"; + return version == "4.0" || version == "12.0" || version == "14.0" || version == "15.0"; } } } -- cgit v1.2.3