forked from NuGet/NuGet.Client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNuGet.MSSigning.Extensions.csproj
More file actions
81 lines (72 loc) · 3.57 KB
/
NuGet.MSSigning.Extensions.csproj
File metadata and controls
81 lines (72 loc) · 3.57 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
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
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="ilmerge.props" />
<PropertyGroup>
<TargetFramework>$(NETFXTargetFramework)</TargetFramework>
<Description>NuGet Command Line Interface for repository signing.</Description>
<Shipping>true</Shipping>
<PackProject>false</PackProject>
<IncludeInVsix>false</IncludeInVsix>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<GetSigningInputsDependsOn>GetSigningInputsCustom</GetSigningInputsDependsOn>
<GetSymbolsToIndexDependsOn>GetSymbolsToIndexCustom</GetSymbolsToIndexDependsOn>
<SignWithMicrosoftKey>true</SignWithMicrosoftKey>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="ILMerge" PrivateAssets="All" />
<None Include="$(BuildCommonDirectory)NOTICES.txt" Pack="true" PackagePath="\" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\NuGet.CommandLine\NuGet.CommandLine.csproj" />
</ItemGroup>
<ItemGroup>
<Compile Update="NuGetMSSignCommand.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>NuGetMSSignCommand.resx</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Update="NuGetMSSignCommand.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>NuGetMSSignCommand.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<Target Name="DetermineILMergeNuGetMssignExeInputsOutputs">
<PropertyGroup>
<PathToBuiltNuGetExe>$(OutputPath)NuGet.exe</PathToBuiltNuGetExe>
<PathToMergedNuGetExe>$(ArtifactsDirectory)$(VsixOutputDirName)\NuGet.Mssign.exe</PathToMergedNuGetExe>
</PropertyGroup>
<ItemGroup>
<BuildArtifacts Include="$(OutputPath)\*.dll" Exclude="@(MergeExclude)" />
</ItemGroup>
<Message Text="$(MSBuildProjectName) -> $(PathToMergedNuGetExe)" Importance="High" />
</Target>
<Target Name="ILMergeNuGetMssignExe"
AfterTargets="Build"
DependsOnTargets="DetermineILMergeNuGetMssignExeInputsOutputs"
Inputs="$(PathToBuiltNuGetExe);@(BuildArtifacts)"
Outputs="$(PathToMergedNuGetExe)"
Condition="'$(BuildingInsideVisualStudio)' != 'true'">
<Error Text="Build dependencies are inconsistent with mergeinclude specified in ilmerge.props" Condition="'@(BuildArtifacts->Count())' != '@(MergeInclude->Count())'" />
<PropertyGroup>
<IlmergeCommand>$(ILMergeConsolePath) $(PathToBuiltNuGetExe) /lib:$(OutputPath) @(BuildArtifacts->'%(filename)%(extension)', ' ') /out:$(PathToMergedNuGetExe) @(MergeAllowDup -> '/allowdup:%(Identity)', ' ')</IlmergeCommand>
<IlmergeCommand Condition="'$(SkipSigning)' != 'true' And Exists($(AssemblyOriginatorKeyFile))">$(IlmergeCommand) /delaysign /keyfile:$(AssemblyOriginatorKeyFile)</IlmergeCommand>
</PropertyGroup>
<MakeDir Directories="$([System.IO.Path]::GetDirectoryName($(PathToMergedNuGetExe)))" />
<Exec Command="$(IlmergeCommand)" ContinueOnError="false" />
</Target>
<Target Name="GetSigningInputsCustom" Returns="@(DllsToSign)">
<ItemGroup>
<DllsToSign Include="$(ArtifactsDirectory)$(VsixOutputDirName)\NuGet.Mssign.exe">
<StrongName>MsSharedLib72</StrongName>
<Authenticode>Microsoft400</Authenticode>
</DllsToSign>
</ItemGroup>
</Target>
<Target Name="GetSymbolsToIndexCustom" Returns="@(SymbolsToIndex)">
<ItemGroup>
<SymbolsToIndex Include="$(ArtifactsDirectory)$(VsixOutputDirName)\NuGet.Mssign.exe" />
<SymbolsToIndex Include="$(ArtifactsDirectory)$(VsixOutputDirName)\NuGet.Mssign.pdb" />
</ItemGroup>
</Target>
</Project>