VS2010Target.cs 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  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("vs2010")]
  15. public class VS2010Target : VSGenericTarget
  16. {
  17. #region Fields
  18. string solutionVersion = "11.00";
  19. string productVersion = "9.0.30729";
  20. string schemaVersion = "2.0";
  21. string versionName = "Visual Studio 2010";
  22. string name = "vs2010";
  23. VSVersion version = VSVersion.VS10;
  24. #endregion
  25. #region Properties
  26. /// <summary>
  27. /// Gets or sets the solution version.
  28. /// </summary>
  29. /// <value>The solution version.</value>
  30. public override string SolutionVersion
  31. {
  32. get
  33. {
  34. return solutionVersion;
  35. }
  36. }
  37. /// <summary>
  38. /// Gets or sets the product version.
  39. /// </summary>
  40. /// <value>The product version.</value>
  41. public override string ProductVersion
  42. {
  43. get
  44. {
  45. return productVersion;
  46. }
  47. }
  48. /// <summary>
  49. /// Gets or sets the schema version.
  50. /// </summary>
  51. /// <value>The schema version.</value>
  52. public override string SchemaVersion
  53. {
  54. get
  55. {
  56. return schemaVersion;
  57. }
  58. }
  59. /// <summary>
  60. /// Gets or sets the name of the version.
  61. /// </summary>
  62. /// <value>The name of the version.</value>
  63. public override string VersionName
  64. {
  65. get
  66. {
  67. return versionName;
  68. }
  69. }
  70. /// <summary>
  71. /// Gets or sets the version.
  72. /// </summary>
  73. /// <value>The version.</value>
  74. public override VSVersion Version
  75. {
  76. get
  77. {
  78. return version;
  79. }
  80. }
  81. /// <summary>
  82. /// Gets the name.
  83. /// </summary>
  84. /// <value>The name.</value>
  85. public override string Name
  86. {
  87. get
  88. {
  89. return name;
  90. }
  91. }
  92. protected override string GetToolsVersionXml(FrameworkVersion frameworkVersion)
  93. {
  94. switch (frameworkVersion)
  95. {
  96. case FrameworkVersion.v4_0:
  97. case FrameworkVersion.v3_5:
  98. return "ToolsVersion=\"4.0\"";
  99. case FrameworkVersion.v3_0:
  100. return "ToolsVersion=\"3.0\"";
  101. default:
  102. return "ToolsVersion=\"2.0\"";
  103. }
  104. }
  105. public override string SolutionTag
  106. {
  107. get { return "# Visual Studio 2010"; }
  108. }
  109. #endregion
  110. #region Constructors
  111. /// <summary>
  112. /// Initializes a new instance of the <see cref="VS2005Target"/> class.
  113. /// </summary>
  114. public VS2010Target()
  115. : base()
  116. {
  117. }
  118. #endregion
  119. }
  120. }