forked from microsoft/slngen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDirectory.Build.targets
113 lines (95 loc) · 5.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<Project>
<Sdk Name="Microsoft.Build.CentralPackageVersions" Version="2.1.3" />
<PropertyGroup>
<MicroBuild_NuPkgSigningEnabled Condition="'$(SignType)' == 'Test'">false</MicroBuild_NuPkgSigningEnabled>
<!-- The target framework 'net5.0' is out of support and will not receive security updates in the future. -->
<CheckEolTargetFramework Condition="'$(TargetFramework)' == 'net5.0'">false</CheckEolTargetFramework>
</PropertyGroup>
<PropertyGroup>
<Authors>Microsoft</Authors>
<Company>Microsoft</Company>
<Copyright>(c) Microsoft Corporation. All rights reserved.</Copyright>
<PackageProjectUrl>https://github.com/microsoft/SlnGen</PackageProjectUrl>
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
<PackageLicensePath>$(MSBuildThisFileDirectory)$(PackageLicenseFile)</PackageLicensePath>
<PackageIcon>Icon.png</PackageIcon>
<PackageIconPath>$(MSBuildThisFileDirectory)branding\$(PackageIcon)</PackageIconPath>
<RepositoryUrl>https://github.com/microsoft/SlnGen.git</RepositoryUrl>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<IncludeSymbols Condition="'$(IncludeSymbols)' == ''">true</IncludeSymbols>
<SymbolPackageFormat Condition="'$(SymbolPackageFormat)' == ''">snupkg</SymbolPackageFormat>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\GlobalSuppressions.cs"
Link="GlobalSuppressions.cs"
Condition="'$(UsingMicrosoftNoTargetsSdk)' != 'true'" />
<AdditionalFiles Include="..\..\stylecop.json"
Visible="false"/>
</ItemGroup>
<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>
<ItemGroup Condition="'$(IsPackable)' == 'true'">
<None Include="$(PackageIconPath)"
Pack="true"
PackagePath="\"
Visible="false" />
<None Include="$(PackageLicensePath)"
Pack="true"
PackagePath="$(PackageLicenseFile)"
Visible="false" />
</ItemGroup>
<Target Name="IncludeReferenceCopyLocalPathsInBuildOutputInPackage"
Condition="'$(IncludeReferenceCopyLocalPathsInBuildOutputInPackage)' == 'true'"
BeforeTargets="_GetBuildOutputFilesWithTfm"
DependsOnTargets="ResolveReferences">
<ItemGroup>
<BuildOutputInPackage Include="@(ReferenceCopyLocalPaths->WithMetadataValue('AssetType', 'runtime'))"
TargetPath="$(TargetFramework)\%(ReferenceCopyLocalPaths.DestinationSubDirectory)%(Filename)%(Extension)" />
<BuildOutputInPackage Include="@(ReferenceCopyLocalPaths->WithMetadataValue('CopyLocal', 'true'))"
TargetPath="$(TargetFramework)\%(ReferenceCopyLocalPaths.DestinationSubDirectory)%(Filename)%(Extension)" />
<BuiltProjectOutputGroupOutput Update="@(BuiltProjectOutputGroupOutput)"
Condition="'%(TargetPath)' == ''"
TargetPath="$(TargetFramework)\%(RecursiveDir)%(Filename)%(Extension)" />
<BuiltProjectOutputGroupOutput Update="@(BuiltProjectOutputGroupOutput)"
Condition="'%(TargetPath)' != ''"
TargetPath="$(TargetFramework)\%(TargetPath)" />
</ItemGroup>
</Target>
<Target Name="UpdateSymbolsPackagePath"
AfterTargets="_WalkEachTargetPerFramework">
<ItemGroup>
<_TargetPathsToSymbols Update="@(_TargetPathsToSymbols)"
TargetPath="%(TargetFramework)\%(Filename)%(Extension)" />
</ItemGroup>
</Target>
<ItemDefinitionGroup>
<InternalsVisibleTo>
<Visible>false</Visible>
</InternalsVisibleTo>
</ItemDefinitionGroup>
<ItemGroup>
<InternalsVisibleTo Update="@(InternalsVisibleTo)" Condition="'$(SignType)' == 'Test' Or '$(SignType)' == 'Real'" Key="002400000480000094000000060200000024000052534131000400000100010015c01ae1f50e8cc09ba9eac9147cf8fd9fce2cfe9f8dce4f7301c4132ca9fb50ce8cbf1df4dc18dd4d210e4345c744ecb3365ed327efdbc52603faa5e21daa11234c8c4a73e51f03bf192544581ebe107adee3a34928e39d04e524a9ce729d5090bfd7dad9d10c722c0def9ccc08ff0a03790e48bcd1f9b6c476063e1966a1c4" />
</ItemGroup>
<!--
ShouldSkipTarget should add the current project to the ProjectToSkip item group if it cannot be built with the toolset.
This is useful if a project cannot be built by dotnet.exe or on a particular platform like Mac or Mono.
Add the current project with a Message so that the user understands why it can't be built and how they can build it if they need to.
-->
<Target Name="ShouldSkipProject" Returns="@(ProjectToSkip)">
<ItemGroup Condition="'$(MSBuildRuntimeType)' == 'Core'">
<ProjectToSkip Include="$(MSBuildProjectFullPath)"
Message="Visual Studio Extension (VSIX) projects cannot be built with dotnet.exe and require you to use msbuild.exe or Visual Studio."
Condition="'$(VsSDKVersion)' != ''" />
</ItemGroup>
</Target>
</Project>