VS2013Target.cs 2.7 KB

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