VS2015Target.cs 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  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("vs2015")]
  15. public class VS2015Target : VSGenericTarget
  16. {
  17. #region Fields
  18. string solutionVersion = "12.00";
  19. string productVersion = "14.0.23107.0";
  20. string schemaVersion = "2.0";
  21. string versionName = "Visual Studio 14";
  22. string name = "vs2015";
  23. VSVersion version = VSVersion.VS15;
  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_6_1:
  97. case FrameworkVersion.v4_6:
  98. return "ToolsVersion=\"14.0\"";
  99. case FrameworkVersion.v4_5:
  100. return "ToolsVersion=\"12.0\"";
  101. case FrameworkVersion.v4_0:
  102. case FrameworkVersion.v3_5:
  103. return "ToolsVersion=\"4.0\"";
  104. case FrameworkVersion.v3_0:
  105. return "ToolsVersion=\"3.0\"";
  106. default:
  107. return "ToolsVersion=\"2.0\"";
  108. }
  109. }
  110. public override string SolutionTag
  111. {
  112. get { return "# Visual Studio 14"; }
  113. }
  114. #endregion
  115. #region Constructors
  116. /// <summary>
  117. /// Initializes a new instance of the <see cref="VS2012Target"/> class.
  118. /// </summary>
  119. public VS2015Target()
  120. : base()
  121. {
  122. }
  123. #endregion
  124. }
  125. }