* Added prototypical VS2008 target

afrisby
lbsa71 2007-12-20 11:30:56 +00:00
parent 8aae909412
commit ffc1428dff
3 changed files with 91 additions and 53 deletions

View File

@ -44,35 +44,16 @@ namespace Prebuild.Core.Targets
[Target("sharpdev2")] [Target("sharpdev2")]
public class SharpDevelop2Target : VS2005Target public class SharpDevelop2Target : VS2005Target
{ {
#region Private Methods protected override string VersionName
private void SetSharpDevelop2() {
{ get
this.VersionName = "SharpDevelop2"; {
} return "SharpDevelop2";
#endregion }
}
#region Public Methods #region Public Methods
/// <summary>
/// Writes the specified kern.
/// </summary>
/// <param name="kern">The kern.</param>
public override void Write(Kernel kern)
{
SetSharpDevelop2();
base.Write(kern);
}
/// <summary>
/// Cleans the specified kern.
/// </summary>
/// <param name="kern">The kern.</param>
public override void Clean(Kernel kern)
{
SetSharpDevelop2();
base.Clean(kern);
}
/// <summary> /// <summary>
/// Gets the name. /// Gets the name.
/// </summary> /// </summary>

View File

@ -230,45 +230,48 @@ namespace Prebuild.Core.Targets
#region Fields #region Fields
string solutionVersion = "9.00";
string productVersion = "8.0.50727";
string schemaVersion = "2.0"; string schemaVersion = "2.0";
string versionName = "Visual C# 2005";
VSVersion version = VSVersion.VS80; VSVersion version = VSVersion.VS80;
Hashtable tools; Hashtable tools;
Kernel kernel; Kernel kernel;
/// <summary> protected virtual string ToolsVersionXml
/// Gets or sets the solution version.
/// </summary>
/// <value>The solution version.</value>
protected string SolutionVersion
{ {
get get
{ {
return this.solutionVersion; return String.Empty;
} }
set }
protected virtual string SolutionTag
{
get { return "# Visual Studio 2005"; }
}
/// <summary>
/// Gets or sets the solution version.
/// </summary>
/// <value>The solution version.</value>
protected virtual string SolutionVersion
{
get
{ {
this.solutionVersion = value; return "9.00";
} }
} }
/// <summary> /// <summary>
/// Gets or sets the product version. /// Gets or sets the product version.
/// </summary> /// </summary>
/// <value>The product version.</value> /// <value>The product version.</value>
protected string ProductVersion protected virtual string ProductVersion
{ {
get get
{ {
return this.productVersion; return "8.0.50727";
}
set
{
this.productVersion = value;
} }
} }
/// <summary> /// <summary>
/// Gets or sets the schema version. /// Gets or sets the schema version.
/// </summary> /// </summary>
@ -288,15 +291,11 @@ namespace Prebuild.Core.Targets
/// Gets or sets the name of the version. /// Gets or sets the name of the version.
/// </summary> /// </summary>
/// <value>The name of the version.</value> /// <value>The name of the version.</value>
protected string VersionName protected virtual string VersionName
{ {
get get
{ {
return this.versionName; return "Visual C# 2005";
}
set
{
this.versionName = value;
} }
} }
/// <summary> /// <summary>
@ -378,7 +377,7 @@ namespace Prebuild.Core.Targets
#region Project File #region Project File
using (ps) using (ps)
{ {
ps.WriteLine("<Project DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">"); ps.WriteLine("<Project DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\"{0}>", ToolsVersionXml );
//ps.WriteLine(" <{0}", toolInfo.XMLTag); //ps.WriteLine(" <{0}", toolInfo.XMLTag);
ps.WriteLine(" <PropertyGroup>"); ps.WriteLine(" <PropertyGroup>");
ps.WriteLine(" <ProjectType>Local</ProjectType>"); ps.WriteLine(" <ProjectType>Local</ProjectType>");
@ -707,7 +706,7 @@ namespace Prebuild.Core.Targets
using (ss) using (ss)
{ {
ss.WriteLine("Microsoft Visual Studio Solution File, Format Version {0}", this.SolutionVersion); 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) foreach (ProjectNode project in solution.Projects)
{ {
if (!tools.ContainsKey(project.Language)) if (!tools.ContainsKey(project.Language))

View File

@ -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";
}
}
}
}