-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Directory.Build.targets
39 lines (32 loc) · 1.6 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
<Project>
<Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" />
<!--
Note: Arcade automatically replaces copyrights defined in .props or .csproj files
by the default Microsoft copyright. To ensure this doesn't happen, the replaced
copyright is restored in this .targets file using the private variable set in .props.
Similarly, both delayed and public signing are disabled to override Arcade's defaults.
-->
<PropertyGroup>
<Copyright>$(_ProjectCopyright)</Copyright>
<DelaySign>false</DelaySign>
<PublicSign>false</PublicSign>
</PropertyGroup>
<PropertyGroup
Condition=" ('$(TargetFrameworkIdentifier)' == '.NETCoreApp' And $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), '9.0'))) ">
<DefineConstants>$(DefineConstants);SUPPORTS_CERTIFICATE_LOADER</DefineConstants>
</PropertyGroup>
<!--
Note: Arcade always generates .resx backing files with internal static methods/constants.
To ensure the OpenNetty resources are public, the default visibility is manually overridden.
-->
<Target Name="OverrideResourcesVisibility" Condition=" @(EmbeddedResourceSGResx) != '' " AfterTargets="_GenerateResxSource">
<WriteLinesToFile
File=" %(EmbeddedResourceSGResx.SourceOutputPath) "
Lines=" $([System.IO.File]::ReadAllText(%(EmbeddedResourceSGResx.SourceOutputPath))
.Replace('internal const', 'public const')
.Replace('internal static', 'public static')
.Replace('static partial class', 'partial class')) "
Overwrite="true"
Encoding="Unicode" />
</Target>
</Project>