VS2008Target.cs 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. using System;
  2. using System.IO;
  3. using System.Text;
  4. using Prebuild.Core.Attributes;
  5. using Prebuild.Core.Interfaces;
  6. using Prebuild.Core.Nodes;
  7. using Prebuild.Core.Utilities;
  8. using System.CodeDom.Compiler;
  9. namespace Prebuild.Core.Targets
  10. {
  11. /// <summary>
  12. ///
  13. /// </summary>
  14. [Target("vs2008")]
  15. public class VS2008Target : VSGenericTarget
  16. {
  17. #region Fields
  18. string solutionVersion = "10.00";
  19. string productVersion = "9.0.21022";
  20. string schemaVersion = "2.0";
  21. string versionName = "Visual Studio 2008";
  22. string name = "vs2008";
  23. VSVersion version = VSVersion.VS90;
  24. /// <summary>
  25. /// Gets or sets the solution version.
  26. /// </summary>
  27. /// <value>The solution version.</value>
  28. public override string SolutionVersion
  29. {
  30. get
  31. {
  32. return solutionVersion;
  33. }
  34. }
  35. /// <summary>
  36. /// Gets or sets the product version.
  37. /// </summary>
  38. /// <value>The product version.</value>
  39. public override string ProductVersion
  40. {
  41. get
  42. {
  43. return productVersion;
  44. }
  45. }
  46. /// <summary>
  47. /// Gets or sets the schema version.
  48. /// </summary>
  49. /// <value>The schema version.</value>
  50. public override string SchemaVersion
  51. {
  52. get
  53. {
  54. return schemaVersion;
  55. }
  56. }
  57. /// <summary>
  58. /// Gets or sets the name of the version.
  59. /// </summary>
  60. /// <value>The name of the version.</value>
  61. public override string VersionName
  62. {
  63. get
  64. {
  65. return versionName;
  66. }
  67. }
  68. /// <summary>
  69. /// Gets or sets the version.
  70. /// </summary>
  71. /// <value>The version.</value>
  72. public override VSVersion Version
  73. {
  74. get
  75. {
  76. return version;
  77. }
  78. }
  79. /// <summary>
  80. /// Gets the name.
  81. /// </summary>
  82. /// <value>The name.</value>
  83. public override string Name
  84. {
  85. get
  86. {
  87. return name;
  88. }
  89. }
  90. protected override string GetToolsVersionXml(FrameworkVersion frameworkVersion)
  91. {
  92. switch (frameworkVersion)
  93. {
  94. case FrameworkVersion.v3_5:
  95. return "ToolsVersion=\"3.5\"";
  96. case FrameworkVersion.v3_0:
  97. return "ToolsVersion=\"3.0\"";
  98. default:
  99. return "ToolsVersion=\"2.0\"";
  100. }
  101. }
  102. public override string SolutionTag
  103. {
  104. get { return "# Visual Studio 2008"; }
  105. }
  106. #endregion
  107. #region Constructors
  108. /// <summary>
  109. /// Initializes a new instance of the <see cref="VS2005Target"/> class.
  110. /// </summary>
  111. public VS2008Target()
  112. : base()
  113. {
  114. }
  115. #endregion
  116. }
  117. }