forked from grpc/grpc-dotnet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Directory.Build.targets
54 lines (44 loc) · 2.38 KB
/
Directory.Build.targets
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<Project>
<!-- IsGrpcPublishedPackage is set in csproj so related config must be in targets file -->
<PropertyGroup Condition=" '$(IsGrpcPublishedPackage)' == 'true' ">
<Authors>The gRPC Authors</Authors>
<Copyright>Copyright 2019 The gRPC Authors</Copyright>
<PackageIcon>packageIcon.png</PackageIcon>
<PackageIconFullPath>$(MSBuildThisFileDirectory)packageIcon.png</PackageIconFullPath>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/grpc/grpc-dotnet</PackageProjectUrl>
<Deterministic>false</Deterministic>
<!-- Include PDB in the built .nupkg -->
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
<CodeAnalysisRuleset>$(MSBuildThisFileDirectory)Grpc.DotNet.ruleset</CodeAnalysisRuleset>
<IsTrimmable>true</IsTrimmable>
<EnableAOTAnalyzer>true</EnableAOTAnalyzer>
</PropertyGroup>
<!-- IsGrpcPublishedPackage is set in csproj so related config must be in targets file -->
<ItemGroup Condition="'$(IsGrpcPublishedPackage)' == 'true'">
<None Include="$(PackageIconFullPath)" Pack="true" PackagePath="\"/>
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
</ItemGroup>
<ItemGroup Condition="$(MSBuildProjectName.EndsWith('Tests'))">
<Using Include="NUnit.Framework.Legacy.ClassicAssert" Alias="Assert" />
<Using Include="NUnit.Framework.Legacy" />
<Using Include="NUnit.Framework" />
</ItemGroup>
<!--
Make a netstandard2.1 copy of the .net ILLinkPack to work around a trimming issue.
See https://github.com/dotnet/linker/issues/3175
TODO: Remove once .NET 8 + trimming + netstandard2.1 is fixed.
-->
<Target Name="_FixKnownILLinkPack"
BeforeTargets="ProcessFrameworkReferences">
<ItemGroup>
<KnownILLinkPack Include="@(KnownILLinkPack)"
Condition="'%(TargetFramework)' == 'net8.0'"
TargetFramework="netstandard2.1"
ILLinkPackVersion="%(KnownILLinkPack.ILLinkPackVersion)" />
</ItemGroup>
</Target>
</Project>