diff --git a/Prebuild/src/Core/Nodes/ProjectNode.cs b/Prebuild/src/Core/Nodes/ProjectNode.cs index 9622d896d5..671564fd0c 100644 --- a/Prebuild/src/Core/Nodes/ProjectNode.cs +++ b/Prebuild/src/Core/Nodes/ProjectNode.cs @@ -97,19 +97,25 @@ namespace Prebuild.Core.Nodes /// .NET 4.5 /// v4_5, - /// - /// .NET 4.5.1 - /// - v4_5_1, - /// - /// .NET 4.6 - /// - v4_6, - /// - /// .NET 4.6.1 - /// - v4_6_1 - } + /// + /// .NET 4.5.1 + /// + v4_5_1, + v4_5_2, + /// + /// .NET 4.6 + /// + v4_6, + /// + /// .NET 4.6.1 + /// + v4_6_1, + v4_6_2, + v4_7, + v4_7_1, + v4_7_2, + v4_8 + } /// /// The Node object representing /Prebuild/Solution/Project elements /// diff --git a/Prebuild/src/Core/Targets/VS2012Target.cs b/Prebuild/src/Core/Targets/VS2012Target.cs index e21c97a258..b1ac0d0819 100644 --- a/Prebuild/src/Core/Targets/VS2012Target.cs +++ b/Prebuild/src/Core/Targets/VS2012Target.cs @@ -101,6 +101,9 @@ namespace Prebuild.Core.Targets { switch (frameworkVersion) { + case FrameworkVersion.v4_7_1: + case FrameworkVersion.v4_7: + case FrameworkVersion.v4_6_2: case FrameworkVersion.v4_6_1: case FrameworkVersion.v4_6: return "ToolsVersion=\"14.0\""; diff --git a/Prebuild/src/Core/Targets/VS2015Target.cs b/Prebuild/src/Core/Targets/VS2015Target.cs index b487979cee..6021b43c93 100644 --- a/Prebuild/src/Core/Targets/VS2015Target.cs +++ b/Prebuild/src/Core/Targets/VS2015Target.cs @@ -106,18 +106,25 @@ namespace Prebuild.Core.Targets { switch (frameworkVersion) { - case FrameworkVersion.v4_6_1: - case FrameworkVersion.v4_6: - return "ToolsVersion=\"14.0\""; - case FrameworkVersion.v4_5: - return "ToolsVersion=\"12.0\""; - case FrameworkVersion.v4_0: - case FrameworkVersion.v3_5: - return "ToolsVersion=\"4.0\""; - case FrameworkVersion.v3_0: - return "ToolsVersion=\"3.0\""; - default: - return "ToolsVersion=\"2.0\""; + case FrameworkVersion.v4_8: + case FrameworkVersion.v4_7_2: + case FrameworkVersion.v4_7_1: + case FrameworkVersion.v4_7: + case FrameworkVersion.v4_6_2: + case FrameworkVersion.v4_6_1: + case FrameworkVersion.v4_6: + return "ToolsVersion=\"14.0\""; + case FrameworkVersion.v4_5_2: + return "ToolsVersion=\"12.0\""; + case FrameworkVersion.v4_5_1: + case FrameworkVersion.v4_5: + case FrameworkVersion.v4_0: + case FrameworkVersion.v3_5: + return "ToolsVersion=\"4.0\""; + case FrameworkVersion.v3_0: + return "ToolsVersion=\"3.0\""; + default: + return "ToolsVersion=\"2.0\""; } } diff --git a/Prebuild/src/Core/Targets/VS2019Target.cs b/Prebuild/src/Core/Targets/VS2019Target.cs new file mode 100644 index 0000000000..52e8162e74 --- /dev/null +++ b/Prebuild/src/Core/Targets/VS2019Target.cs @@ -0,0 +1,152 @@ +using System; +using System.IO; +using System.Text; + +using Prebuild.Core.Attributes; +using Prebuild.Core.Interfaces; +using Prebuild.Core.Nodes; +using Prebuild.Core.Utilities; +using System.CodeDom.Compiler; + +namespace Prebuild.Core.Targets +{ + + /// + /// + /// + [Target("vs2019")] + public class VS2019Target : VSGenericTarget + { + #region Fields + + string solutionVersion = "12.00"; + string productVersion = "16.7.3"; + string schemaVersion = "2.0"; + string versionName = "Visual Studio 19"; + string name = "vs2019"; + VSVersion version = VSVersion.VS19; + + #endregion + + #region Properties + + /// + /// Gets or sets the solution version. + /// + /// The solution version. + public override string SolutionVersion + { + get + { + return solutionVersion; + } + } + + /// + /// Gets or sets the product version. + /// + /// The product version. + public override string ProductVersion + { + get + { + return productVersion; + } + } + + /// + /// Gets or sets the schema version. + /// + /// The schema version. + public override string SchemaVersion + { + get + { + return schemaVersion; + } + } + + /// + /// Gets or sets the name of the version. + /// + /// The name of the version. + public override string VersionName + { + get + { + return versionName; + } + } + + /// + /// Gets or sets the version. + /// + /// The version. + public override VSVersion Version + { + get + { + return version; + } + } + + /// + /// Gets the name. + /// + /// The name. + public override string Name + { + get + { + return name; + } + } + + protected override string GetToolsVersionXml(FrameworkVersion frameworkVersion) + { + switch (frameworkVersion) + { + case FrameworkVersion.v4_8: + case FrameworkVersion.v4_7_2: + return "ToolsVersion=\"16.0\""; + case FrameworkVersion.v4_7_1: + case FrameworkVersion.v4_7: + return "ToolsVersion=\"15.0\""; + case FrameworkVersion.v4_6_2: + case FrameworkVersion.v4_6_1: + case FrameworkVersion.v4_6: + return "ToolsVersion=\"14.0\""; + case FrameworkVersion.v4_5_2: + return "ToolsVersion=\"12.0\""; + case FrameworkVersion.v4_5_1: + case FrameworkVersion.v4_5: + case FrameworkVersion.v4_0: + case FrameworkVersion.v3_5: + return "ToolsVersion=\"4.0\""; + case FrameworkVersion.v3_0: + return "ToolsVersion=\"3.0\""; + default: + return "ToolsVersion=\"2.0\""; + } + } + + public override string SolutionTag + { + get { return "# Visual Studio 19"; } + } + + #endregion + + #region Constructors + + /// + /// Initializes a new instance of the class. + /// + public VS2019Target() + : base() + { + } + + #endregion + } +} \ No newline at end of file diff --git a/Prebuild/src/Core/Targets/VSVersion.cs b/Prebuild/src/Core/Targets/VSVersion.cs index b917878bdc..52ad2ad374 100644 --- a/Prebuild/src/Core/Targets/VSVersion.cs +++ b/Prebuild/src/Core/Targets/VSVersion.cs @@ -58,10 +58,11 @@ namespace Prebuild.Core.Targets /// Visual Studio 2013 /// VS12, - /// - /// Visual Studio 2015 - /// - VS15 - + /// + /// Visual Studio 2015 + /// + VS15, + VS17, + VS19 } } diff --git a/bin/Prebuild.exe b/bin/Prebuild.exe index aeecaccb1d..431b14dc74 100755 Binary files a/bin/Prebuild.exe and b/bin/Prebuild.exe differ