|
1 | 1 | <Project Sdk="Microsoft.NET.Sdk"> |
2 | 2 |
|
3 | | - <PropertyGroup> |
4 | | - <AssemblyName>TurnerSoftware.BuildVersioning.Tool</AssemblyName> |
5 | | - <Title>TurnerSoftware.BuildVersioning.Tool</Title> |
6 | | - <Description>Simple build versioning for .NET, powered by Git tags (CLI Tool)</Description> |
7 | | - <PackageTags>$(PackageBaseTags)</PackageTags> |
8 | | - <Authors>James Turner</Authors> |
9 | | - </PropertyGroup> |
| 3 | + <PropertyGroup> |
| 4 | + <AssemblyName>TurnerSoftware.BuildVersioning.Tool</AssemblyName> |
| 5 | + <Title>TurnerSoftware.BuildVersioning.Tool</Title> |
| 6 | + <Description>Simple build versioning for .NET, powered by Git tags (CLI Tool)</Description> |
| 7 | + <PackageTags>$(PackageBaseTags)</PackageTags> |
| 8 | + <Authors>James Turner</Authors> |
| 9 | + </PropertyGroup> |
10 | 10 |
|
11 | | - <PropertyGroup> |
12 | | - <OutputType>Exe</OutputType> |
13 | | - <TargetFramework>net5.0</TargetFramework> |
14 | | - <BuildVersioningLogLevel>high</BuildVersioningLogLevel> |
15 | | - <RootNamespace>TurnerSoftware.BuildVersioning.Tool</RootNamespace> |
16 | | - <PackAsTool>true</PackAsTool> |
17 | | - <ToolCommandName>buildversioning</ToolCommandName> |
18 | | - </PropertyGroup> |
| 11 | + <PropertyGroup> |
| 12 | + <OutputType>Exe</OutputType> |
| 13 | + <TargetFrameworks>net5.0;net6.0</TargetFrameworks> |
| 14 | + <BuildVersioningLogLevel>high</BuildVersioningLogLevel> |
| 15 | + <RootNamespace>TurnerSoftware.BuildVersioning.Tool</RootNamespace> |
| 16 | + <PackAsTool>true</PackAsTool> |
| 17 | + <ToolCommandName>buildversioning</ToolCommandName> |
| 18 | + </PropertyGroup> |
19 | 19 |
|
20 | | - <PropertyGroup> |
21 | | - <BuildVersioningToolPath>$(MSBuildThisFileDirectory)bin/$(Configuration)/$(TargetFramework)/TurnerSoftware.BuildVersioning.Tool.dll</BuildVersioningToolPath> |
22 | | - <SelfHostedBuildVersioning Condition="$(DesignTimeBuild) != 'true' AND $(SkipBuildVersioning) != 'true'">true</SelfHostedBuildVersioning> |
23 | | - </PropertyGroup> |
24 | | - |
25 | | - <ItemGroup> |
26 | | - <PackageReference Include="System.CommandLine" Version="2.0.0-beta1.20071.2" PrivateAssets="All" /> |
27 | | - </ItemGroup> |
| 20 | + <PropertyGroup> |
| 21 | + <BuildVersioningToolBasePath>$(MSBuildThisFileDirectory)bin/$(Configuration)</BuildVersioningToolBasePath> |
| 22 | + <SelfHostedBuildVersioning Condition="$(DesignTimeBuild) != 'true' AND $(SkipBuildVersioning) != 'true'">true</SelfHostedBuildVersioning> |
| 23 | + </PropertyGroup> |
| 24 | + |
| 25 | + <ItemGroup> |
| 26 | + <PackageReference Include="System.CommandLine" Version="2.0.0-beta1.21308.1" PrivateAssets="All" /> |
| 27 | + </ItemGroup> |
| 28 | + |
| 29 | + <!-- Self-hosting Support --> |
| 30 | + <Import Project="../TurnerSoftware.BuildVersioning/build/TurnerSoftware.BuildVersioning.targets" Condition="$(SelfHostedBuildVersioning) == 'true'" /> |
| 31 | + <Target Name="_SelfHostedBuildVersioning" BeforeTargets="BeforeBuild" Condition="$(SelfHostedBuildVersioning) == 'true' AND !Exists($(BuildVersioningToolPath))"> |
| 32 | + <Message Importance="high" Text="Build Versioning Self-Hosting ($(TargetFramework)): Started" /> |
| 33 | + <Exec Command="dotnet build TurnerSoftware.BuildVersioning.Tool.csproj -c $(Configuration) -f $(TargetFramework) -v quiet --nologo /p:SkipBuildVersioning=true" StandardOutputImportance="low"></Exec> |
| 34 | + <Message Importance="high" Text="Build Versioning Self-Hosting ($(TargetFramework)): Complete" /> |
| 35 | + </Target> |
28 | 36 |
|
29 | | - <!-- Self-hosting Support --> |
30 | | - <Import Project="../TurnerSoftware.BuildVersioning/build/TurnerSoftware.BuildVersioning.targets" Condition="$(SelfHostedBuildVersioning) == 'true'" /> |
31 | | - <Target Name="_SelfHostedBuildVersioning" BeforeTargets="BeforeBuild" Condition="$(SelfHostedBuildVersioning) == 'true' AND !Exists($(BuildVersioningToolPath))"> |
32 | | - <Message Importance="high" Text="BuildVersioning-SelfHosting: Establishing a baseline build to provide versioning support" /> |
33 | | - <Exec Command="dotnet build TurnerSoftware.BuildVersioning.Tool.csproj -c $(Configuration) -v quiet --nologo /p:SkipBuildVersioning=true" StandardOutputImportance="low"></Exec> |
34 | | - <Message Importance="high" Text="BuildVersioning-SelfHosting: Baseline build has been completed" /> |
35 | | - </Target> |
36 | | - |
37 | 37 | </Project> |
0 commit comments