From ffc1428dff8e71952b43001a8fc6223daeeb5bcf Mon Sep 17 00:00:00 2001
From: lbsa71
Date: Thu, 20 Dec 2007 11:30:56 +0000
Subject: * Added prototypical VS2008 target
---
Prebuild/src/Core/Targets/SharpDevelop2Target.cs | 35 ++++----------
Prebuild/src/Core/Targets/VS2005Target.cs | 47 ++++++++++---------
Prebuild/src/Core/Targets/VS2008Target.cs | 58 ++++++++++++++++++++++++
3 files changed, 89 insertions(+), 51 deletions(-)
create mode 100644 Prebuild/src/Core/Targets/VS2008Target.cs
(limited to 'Prebuild/src')
diff --git a/Prebuild/src/Core/Targets/SharpDevelop2Target.cs b/Prebuild/src/Core/Targets/SharpDevelop2Target.cs
index 7109ceb..6b0552e 100644
--- a/Prebuild/src/Core/Targets/SharpDevelop2Target.cs
+++ b/Prebuild/src/Core/Targets/SharpDevelop2Target.cs
@@ -44,35 +44,16 @@ namespace Prebuild.Core.Targets
[Target("sharpdev2")]
public class SharpDevelop2Target : VS2005Target
{
- #region Private Methods
- private void SetSharpDevelop2()
- {
- this.VersionName = "SharpDevelop2";
- }
- #endregion
+ protected override string VersionName
+ {
+ get
+ {
+ return "SharpDevelop2";
+ }
+ }
#region Public Methods
-
- ///
- /// Writes the specified kern.
- ///
- /// The kern.
- public override void Write(Kernel kern)
- {
- SetSharpDevelop2();
- base.Write(kern);
- }
-
- ///
- /// Cleans the specified kern.
- ///
- /// The kern.
- public override void Clean(Kernel kern)
- {
- SetSharpDevelop2();
- base.Clean(kern);
- }
-
+
///
/// Gets the name.
///
diff --git a/Prebuild/src/Core/Targets/VS2005Target.cs b/Prebuild/src/Core/Targets/VS2005Target.cs
index f01906b..bd56beb 100644
--- a/Prebuild/src/Core/Targets/VS2005Target.cs
+++ b/Prebuild/src/Core/Targets/VS2005Target.cs
@@ -230,45 +230,48 @@ namespace Prebuild.Core.Targets
#region Fields
- string solutionVersion = "9.00";
- string productVersion = "8.0.50727";
string schemaVersion = "2.0";
- string versionName = "Visual C# 2005";
VSVersion version = VSVersion.VS80;
Hashtable tools;
Kernel kernel;
+
+ protected virtual string ToolsVersionXml
+ {
+ get
+ {
+ return String.Empty;
+ }
+ }
- ///
+ protected virtual string SolutionTag
+ {
+ get { return "# Visual Studio 2005"; }
+ }
+
+ ///
/// Gets or sets the solution version.
///
/// The solution version.
- protected string SolutionVersion
+ protected virtual string SolutionVersion
{
get
{
- return this.solutionVersion;
- }
- set
- {
- this.solutionVersion = value;
+ return "9.00";
}
}
///
/// Gets or sets the product version.
///
/// The product version.
- protected string ProductVersion
+ protected virtual string ProductVersion
{
get
{
- return this.productVersion;
- }
- set
- {
- this.productVersion = value;
+ return "8.0.50727";
}
}
+
///
/// Gets or sets the schema version.
///
@@ -288,15 +291,11 @@ namespace Prebuild.Core.Targets
/// Gets or sets the name of the version.
///
/// The name of the version.
- protected string VersionName
+ protected virtual string VersionName
{
get
{
- return this.versionName;
- }
- set
- {
- this.versionName = value;
+ return "Visual C# 2005";
}
}
///
@@ -378,7 +377,7 @@ namespace Prebuild.Core.Targets
#region Project File
using (ps)
{
- ps.WriteLine("");
+ ps.WriteLine("", ToolsVersionXml );
//ps.WriteLine(" <{0}", toolInfo.XMLTag);
ps.WriteLine(" ");
ps.WriteLine(" Local");
@@ -707,7 +706,7 @@ namespace Prebuild.Core.Targets
using (ss)
{
ss.WriteLine("Microsoft Visual Studio Solution File, Format Version {0}", this.SolutionVersion);
- ss.WriteLine("# Visual Studio 2005");
+ ss.WriteLine(SolutionTag);
foreach (ProjectNode project in solution.Projects)
{
if (!tools.ContainsKey(project.Language))
diff --git a/Prebuild/src/Core/Targets/VS2008Target.cs b/Prebuild/src/Core/Targets/VS2008Target.cs
new file mode 100644
index 0000000..6074915
--- /dev/null
+++ b/Prebuild/src/Core/Targets/VS2008Target.cs
@@ -0,0 +1,58 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using Prebuild.Core.Attributes;
+
+namespace Prebuild.Core.Targets
+{
+ [Target("vs2008")]
+ public class VS2008Target : VS2005Target
+ {
+ protected override string SolutionTag
+ {
+ get { return "# Visual Studio 2008"; }
+ }
+
+ protected override string SolutionVersion
+ {
+ get
+ {
+ return "10.00";
+ }
+ }
+
+ protected override string VersionName
+ {
+ get
+ {
+ return "Visual C# 2008";
+ }
+ }
+
+ protected override string ToolsVersionXml
+ {
+ get
+ {
+ return " ToolsVersion=\"3.5\"";
+ }
+ }
+
+
+ // TODO: This needs updating!
+ protected override string ProductVersion
+ {
+ get
+ {
+ return "9.0.20706";
+ }
+ }
+
+ public override string Name
+ {
+ get
+ {
+ return "vs2008";
+ }
+ }
+ }
+}
--
cgit v1.1