58 行
2.9 KiB
XML
58 行
2.9 KiB
XML
<Project>
|
|
|
|
<!--
|
|
Directory.Build.targets is automatically picked up and imported by
|
|
Microsoft.Common.targets. This file needs to exist, even if empty so that
|
|
files in the parent directory tree, with the same name, are not imported
|
|
instead. The import fairly late and most other props/targets will have been
|
|
imported beforehand. We also don't need to add ourselves to
|
|
MSBuildAllProjects, as that is done by the file that imports us.
|
|
-->
|
|
|
|
<!--
|
|
Manually set the version if null. This is copied from Microsoft.NET.DefaultAssemblyInfo.targets and is needed
|
|
for cases where that target is not being automatically imported (which happens because MSBuild is used instead
|
|
of dotnet build for some cases, due to the solution having some WinUI 3 projects). The lines setting the prefix
|
|
have been omitted, as that is already handled in the root .props file.
|
|
-->
|
|
<PropertyGroup Condition="'$(Version)' == ''">
|
|
<Version Condition="'$(VersionSuffix)' != ''">$(VersionPrefix)-$(VersionSuffix)</Version>
|
|
<Version Condition="'$(Version)' == ''">$(VersionPrefix)</Version>
|
|
</PropertyGroup>
|
|
|
|
<!-- Set the base package version (this applies to all build types) -->
|
|
<PropertyGroup>
|
|
<PackageVersion>$(Version)</PackageVersion>
|
|
</PropertyGroup>
|
|
|
|
<!-- Settings that are only set for CI builds -->
|
|
<PropertyGroup Condition="'$(GITHUB_RUN_ID)' != ''">
|
|
<PackageVersion Condition="'$(EXCLUDE_RUN_ID_FROM_PACKAGE)' != 'true' AND '$(IsCommitOnReleaseBranch)' != true">$(Version).$(GITHUB_RUN_ID)</PackageVersion>
|
|
<PackageVersion Condition="'$(GITHUB_SHA)' != ''">$(PackageVersion)+$(GITHUB_SHA)</PackageVersion>
|
|
</PropertyGroup>
|
|
|
|
<!-- Import all .tt files with their generated .g.cs files (the T4 service is imported in the .props file) -->
|
|
<ItemGroup>
|
|
<None Update="**\*.tt">
|
|
<LastGenOutput>%(Filename).g.cs</LastGenOutput>
|
|
<Generator>TextTemplatingFileGenerator</Generator>
|
|
</None>
|
|
<Compile Update="**\*.g.cs">
|
|
<DependentUpon>$([System.IO.Path]::GetFileNameWithoutExtension('%(Filename)')).tt</DependentUpon>
|
|
<DesignTime>True</DesignTime>
|
|
<AutoGen>True</AutoGen>
|
|
</Compile>
|
|
</ItemGroup>
|
|
|
|
<!--
|
|
Setting this property is needed as a temporary workaround for an MSBuild bug triggered by WinAppSDK,
|
|
around 'GetReferenceTargetPlatformMonikers'. That target is currently producing multiple items and breaking
|
|
the build (in particular here it causes aliases to be lost/overwritten, and to ignore some attributes such
|
|
as 'PrivateAssets', causing potential type collisions across different projects) when compiling projects.
|
|
This can be removed once the bug is fixed in MSBuild and the tooling is updated here (likely VS 17.12).
|
|
See: https://github.com/dotnet/msbuild/pull/10220.
|
|
-->
|
|
<PropertyGroup>
|
|
<FindInvalidProjectReferences>false</FindInvalidProjectReferences>
|
|
</PropertyGroup>
|
|
</Project> |