-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Expand file tree
/
Copy pathDirectory.Build.targets
More file actions
39 lines (34 loc) · 1.88 KB
/
Directory.Build.targets
File metadata and controls
39 lines (34 loc) · 1.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<Project>
<PropertyGroup>
<!-- Disable IsAotCompatible on non-DefaultNetCoreTargetFrameworks even if explicitly enabled or else we'll get NETSDK1210 errors -->
<IsAotCompatible Condition="'$(TargetFramework)' != '$(DefaultNetCoreTargetFramework)'"></IsAotCompatible>
<PackageReadmeFile Condition="'$(PackageReadmeFile)' == '' and Exists('README.md')">README.md</PackageReadmeFile>
</PropertyGroup>
<ItemGroup Condition="'$(PackageReadmeFile)' != ''">
<None Include="$(PackageReadmeFile)" Pack="true" PackagePath="\" />
</ItemGroup>
<ItemGroup>
<FrameworkReference Update="Microsoft.NETCore.App"
Condition="('$(TargetFramework)' == '$(DefaultNetCoreTargetFramework)') AND
('$(PackAsTool)' != 'true')"
RuntimeFrameworkVersion="$(MicrosoftNETCoreAppRefVersion)"
TargetingPackVersion="$(MicrosoftNETCoreAppRefVersion)" />
</ItemGroup>
<Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" />
<Import Project="eng\testing\linker\trimmingTests.targets" Condition="'$(IsPublishedAppTestProject)' == 'true'" />
<Target Name="GetCustomAssemblyAttributes"
BeforeTargets="GetAssemblyAttributes"
Condition=" '$(MSBuildProjectExtension)' == '.csproj' "
DependsOnTargets="InitializeSourceControlInformation">
<ItemGroup>
<AssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute" Condition="'$(SourceRevisionId)' != ''">
<_Parameter1>CommitHash</_Parameter1>
<_Parameter2>$(SourceRevisionId)</_Parameter2>
</AssemblyAttribute>
<AssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute" Condition="'$(Serviceable)' == 'true'">
<_Parameter1>Serviceable</_Parameter1>
<_Parameter2>True</_Parameter2>
</AssemblyAttribute>
</ItemGroup>
</Target>
</Project>