1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- <Project>
- <!-- This props all need to be set in targets as they depend on the values set earlier -->
-
- <PropertyGroup>
- <Product>$(AssemblyName) ($(TargetFramework))</Product>
- </PropertyGroup>
-
- <PropertyGroup Condition="'$(TargetFramework)' == 'net472'">
- <DefineConstants>$(DefineConstants);HAS_WINFORMS;HAS_WPF;HAS_WINRT;HAS_DISPATCHER;HAS_REMOTING;DESKTOPCLR;NO_NULLABLE_ATTRIBUTES</DefineConstants>
- </PropertyGroup>
- <PropertyGroup Condition="'$(TargetFramework)' == 'uap10.0.18362'">
- <DefineConstants>$(DefineConstants);HAS_WINRT;WINDOWS;HAS_OS_XAML;LEGACY_WINRT;NO_NULLABLE_ATTRIBUTES</DefineConstants>
- <TargetPlatformVersion>10.0.19041.0</TargetPlatformVersion>
- </PropertyGroup>
- <PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
- <DefineConstants>$(DefineConstants);HAS_WINRT;NO_NULLABLE_ATTRIBUTES</DefineConstants>
- </PropertyGroup>
- <PropertyGroup Condition="$(TargetFramework.StartsWith('net6.0')) or $(TargetFramework.StartsWith('net7.0')) or $(TargetFramework.StartsWith('net8.0'))">
- <DefineConstants>$(DefineConstants);HAS_TRIMMABILITY_ATTRIBUTES</DefineConstants>
- </PropertyGroup>
- <PropertyGroup Condition="$(TargetFramework.StartsWith('net6.0-windows')) or $(TargetFramework.StartsWith('net7.0-windows')) or $(TargetFramework.StartsWith('net8.0-windows'))">
- <DefineConstants>$(DefineConstants);HAS_WINRT;HAS_WINFORMS;HAS_WPF;HAS_DISPATCHER;DESKTOPCLR;WINDOWS;CSWINRT</DefineConstants>
- </PropertyGroup>
- <ItemGroup Condition="'$(TargetFramework)' == 'net472' or '$(TargetFramework)' == 'uap10.0.18362' or '$(TargetFramework)' == 'netstandard2.0'">
- <PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
- </ItemGroup>
- <Target Name="AddCommitHashToAssemblyAttributes" BeforeTargets="GetAssemblyAttributes">
- <ItemGroup>
- <AssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute" Condition=" '$(SourceRevisionId)' != '' ">
- <_Parameter1>CommitHash</_Parameter1>
- <_Parameter2>$(SourceRevisionId)</_Parameter2>
- </AssemblyAttribute>
- </ItemGroup>
- </Target>
- <!-- Remove once coverlet supports this built-in -->
- <Target Name="CoverletGetPathMap"
- DependsOnTargets="InitializeSourceRootMappedPaths"
- Returns="@(_LocalTopLevelSourceRoot)"
- Condition="'$(DeterministicSourcePaths)' == 'true'">
- <ItemGroup>
- <_LocalTopLevelSourceRoot Include="@(SourceRoot)" Condition="'%(SourceRoot.NestedRoot)' == ''"/>
- </ItemGroup>
- </Target>
- </Project>
|