File tree Expand file tree Collapse file tree 7 files changed +39
-20
lines changed
Adapter/MSTest.TestAdapter
Platform/Microsoft.Testing.Platform Expand file tree Collapse file tree 7 files changed +39
-20
lines changed Original file line number Diff line number Diff line change 84
84
</None >
85
85
</ItemGroup >
86
86
87
+ <!-- Insert the MSTestVersion.cs -->
88
+ <PropertyGroup >
89
+ <EnableDefaultCompileItems >false</EnableDefaultCompileItems >
90
+ </PropertyGroup >
91
+ <ItemGroup >
92
+ <Compile Include =" **/*.cs" Exclude =" **/*.user; **/*.*proj; **/*.sln; **/*.vssscc" />
93
+ </ItemGroup >
94
+ <Target Name =" InsertMSTestVersion" BeforeTargets =" PrepareForBuild" >
95
+ <ItemGroup >
96
+ <Compile Include =" $(Compile);$(IntermediateOutputPath)/MSTestVersion.cs" />
97
+ </ItemGroup >
98
+ </Target >
99
+
100
+ <!-- Version templating -->
101
+ <ItemGroup >
102
+ <PackageReference Include =" Microsoft.DotNet.Build.Tasks.Templating" Version =" $(MicrosoftDotNetBuildTasksTemplatingPackageVersion)" AllowExplicitReference =" true" PrivateAssets =" All" IsImplicitlyDefined =" true" />
103
+ </ItemGroup >
104
+ <Target Name =" GenerateMSTestVersionSourceFile" AfterTargets =" PrepareForBuild" >
105
+ <PropertyGroup >
106
+ <_TemplateProperties >Version=$(Version)</_TemplateProperties >
107
+ </PropertyGroup >
108
+ <ItemGroup >
109
+ <_TemplateCsproj Include =" $(MSBuildProjectDirectory)/MSTestVersion.cs.template" Destination =" $(IntermediateOutputPath)/MSTestVersion.cs" />
110
+ </ItemGroup >
111
+ <GenerateFileFromTemplate TemplateFile =" %(_TemplateCsproj.Identity)" OutputPath =" %(_TemplateCsproj.Destination)" Properties =" $(_TemplateProperties)" >
112
+ <Output TaskParameter =" ResolvedOutputPath" ItemName =" FileWrites" />
113
+ </GenerateFileFromTemplate >
114
+ </Target >
115
+
87
116
<!-- SDK bottom import -->
88
117
<Import Project =" Sdk.targets" Sdk =" MSBuild.Sdk.Extras" Condition =" '$(OS)' == 'Windows_NT' " />
89
118
<Import Project =" Sdk.targets" Sdk =" Microsoft.NET.Sdk" Condition =" '$(OS)' != 'Windows_NT' " />
Original file line number Diff line number Diff line change 4
4
/// <summary>
5
5
/// Repository version, created at build time.
6
6
/// </summary>
7
- internal static class RepositoryVersion
7
+ internal static class MSTestVersion
8
8
{
9
- public const string Version = "${Version}";
9
+ public const string SemanticVersion = "${Version}";
10
10
}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ internal sealed class MSTestExtension : IExtension
12
12
13
13
public string DisplayName => "MSTest" ;
14
14
15
- public string Version => RepositoryVersion . Version ;
15
+ public string Version => MSTestVersion . SemanticVersion ;
16
16
17
17
public string Description => "MSTest Framework for Microsoft Testing Platform" ;
18
18
Original file line number Diff line number Diff line change @@ -5,5 +5,5 @@ namespace Microsoft.Testing.Platform.Helpers;
5
5
6
6
internal static class AppVersion
7
7
{
8
- public static readonly string DefaultSemVer = RepositoryVersion . Version ;
8
+ public static readonly string DefaultSemVer = PlatformVersion . Version ;
9
9
}
Original file line number Diff line number Diff line change 8
8
<SuppressLicenseValidation >true</SuppressLicenseValidation >
9
9
</PropertyGroup >
10
10
11
- <!-- Insert the RepositoryVersion .cs -->
11
+ <!-- Insert the PlatformVersion .cs -->
12
12
<PropertyGroup >
13
13
<EnableDefaultCompileItems >false</EnableDefaultCompileItems >
14
14
</PropertyGroup >
15
15
<ItemGroup >
16
16
<Compile Include =" **/*.cs" Exclude =" **/*.user; **/*.*proj; **/*.sln; **/*.vssscc" />
17
17
</ItemGroup >
18
- <Target Name =" InsertRepositoryVersion " BeforeTargets =" PrepareForBuild" >
18
+ <Target Name =" InsertPlatformVersion " BeforeTargets =" PrepareForBuild" >
19
19
<ItemGroup >
20
- <Compile Include =" $(Compile);$(IntermediateOutputPath)/RepositoryVersion .cs" />
20
+ <Compile Include =" $(Compile);$(IntermediateOutputPath)/PlatformVersion .cs" />
21
21
</ItemGroup >
22
22
</Target >
23
23
@@ -106,12 +106,12 @@ This package provides the core platform and the .NET implementation of the proto
106
106
<ItemGroup >
107
107
<PackageReference Include =" Microsoft.DotNet.Build.Tasks.Templating" Version =" $(MicrosoftDotNetBuildTasksTemplatingPackageVersion)" AllowExplicitReference =" true" PrivateAssets =" All" IsImplicitlyDefined =" true" />
108
108
</ItemGroup >
109
- <Target Name =" GenerateRepositoryVersionSourceFile " AfterTargets =" PrepareForBuild" >
109
+ <Target Name =" GeneratePlatformVersionSourceFile " AfterTargets =" PrepareForBuild" >
110
110
<PropertyGroup >
111
111
<_TemplateProperties >Version=$(Version)</_TemplateProperties >
112
112
</PropertyGroup >
113
113
<ItemGroup >
114
- <_TemplateCsproj Include =" $(MSBuildProjectDirectory)/RepositoryVersion .cs.template" Destination =" $(IntermediateOutputPath)/RepositoryVersion .cs" />
114
+ <_TemplateCsproj Include =" $(MSBuildProjectDirectory)/PlatformVersion .cs.template" Destination =" $(IntermediateOutputPath)/PlatformVersion .cs" />
115
115
</ItemGroup >
116
116
<GenerateFileFromTemplate TemplateFile =" %(_TemplateCsproj.Identity)" OutputPath =" %(_TemplateCsproj.Destination)" Properties =" $(_TemplateProperties)" >
117
117
<Output TaskParameter =" ResolvedOutputPath" ItemName =" FileWrites" />
Original file line number Diff line number Diff line change 4
4
/// <summary>
5
5
/// Repository version, created at build time.
6
6
/// </summary>
7
- internal static class RepositoryVersion
7
+ internal static class PlatformVersion
8
8
{
9
9
public const string Version = "${Version}";
10
10
}
You can’t perform that action at this time.
0 commit comments