-
Notifications
You must be signed in to change notification settings - Fork 81
/
Directory.Build.targets
79 lines (71 loc) · 3.66 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<Project>
<PropertyGroup>
<MicroBuild_NuPkgSigningEnabled Condition="'$(SignType)' == 'Test'">false</MicroBuild_NuPkgSigningEnabled>
<NoWarn Condition="'$(IsTestProject)' == 'true'">$(NoWarn);SA1600</NoWarn>
<ShadeAssemblies Condition="'$(Configuration)' == 'Release'">false</ShadeAssemblies>
</PropertyGroup>
<PropertyGroup Condition="'$(SignType)' == 'Test'">
<SignAssembly>true</SignAssembly>
<DelaySign Condition="'$(MicroBuild_SigningTargetsImported)' == 'true'">true</DelaySign>
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)Test.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<PropertyGroup Condition="'$(SignType)' == 'Real'">
<SignAssembly>true</SignAssembly>
<DelaySign Condition="'$(IsTestProject)' != 'true'">true</DelaySign>
<AssemblyOriginatorKeyFile Condition="'$(IsTestProject)' != 'true'">$(MSBuildThisFileDirectory)MicrosoftCorporation.snk</AssemblyOriginatorKeyFile>
<AssemblyOriginatorKeyFile Condition="'$(IsTestProject)' == 'true'">$(MSBuildThisFileDirectory)Test.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<PropertyGroup>
<Authors>Microsoft</Authors>
<Company>Microsoft</Company>
<Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
<PackageProjectUrl>https://github.com/Microsoft/MSBuildSdks</PackageProjectUrl>
<PackageIcon>MSBuild-NuGet-Icon.png</PackageIcon>
<PackageIconPath>$(MSBuildThisFileDirectory)branding\$(PackageIcon)</PackageIconPath>
<RepositoryUrl>https://github.com/Microsoft/MSBuildSdks.git</RepositoryUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
</PropertyGroup>
<ItemGroup Condition="'$(IsPackable)' == 'true'">
<None Include="Sdk\**"
Pack="true"
PackagePath="Sdk\" />
<None Include="README.md" />
<None Include="version.json" />
<None Include="$(PackageIconPath)"
Pack="true"
PackagePath="\"
Visible="false" />
</ItemGroup>
<ItemGroup Condition="'$(IsTestProject)' == 'true'">
<Compile Include="$(MSBuildThisFileDirectory)src\TestShared\*.cs" />
<Content Include="$(MSBuildThisFileDirectory)xunit.runner.json"
CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
<ItemGroup>
<InternalsVisibleTo Update="@(InternalsVisibleTo)" Condition="'$(SignType)' == 'Test' Or '$(SignType)' == 'Real'" Key="002400000480000094000000060200000024000052534131000400000100010015c01ae1f50e8cc09ba9eac9147cf8fd9fce2cfe9f8dce4f7301c4132ca9fb50ce8cbf1df4dc18dd4d210e4345c744ecb3365ed327efdbc52603faa5e21daa11234c8c4a73e51f03bf192544581ebe107adee3a34928e39d04e524a9ce729d5090bfd7dad9d10c722c0def9ccc08ff0a03790e48bcd1f9b6c476063e1966a1c4" />
</ItemGroup>
<!-- BEGIN workaround for https://github.com/dotnet/sdk/issues/43339; remove after updated to VS 17.12 or a future 17.11 patch -->
<Target Name="WorkaroundDotnetSdk43339" BeforeTargets="ResolvePackageAssets" Condition=" '$(MSBuildRuntimeType)' == 'Full' and $([MSBuild]::VersionLessThan($(MSBuildVersion), 17.12.0))">
<PrimeSystemTextJson804 />
</Target>
<UsingTask
TaskName="PrimeSystemTextJson804"
TaskFactory="RoslynCodeTaskFactory"
AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.Core.dll" >
<Task>
<Code Type="Fragment" Language="cs">
<![CDATA[
try
{
System.Reflection.Assembly.LoadFrom(@"$(MicrosoftNETBuildTasksDirectoryRoot)\..\..\..\DotnetTools\dotnet-format\BuildHost-net472\System.Text.Json.dll");
}
catch
{
// Best effort: if something moves in the SDK don't break the build.
}
]]>
</Code>
</Task>
</UsingTask>
<!-- END workaround for https://github.com/dotnet/sdk/issues/43339 -->
</Project>