-
Notifications
You must be signed in to change notification settings - Fork 746
Expand file tree
/
Copy pathNuGet.MSSigning.Extensions.csproj
More file actions
73 lines (65 loc) · 3.38 KB
/
NuGet.MSSigning.Extensions.csproj
File metadata and controls
73 lines (65 loc) · 3.38 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
<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>
<GetSymbolsToIndexDependsOn>GetSymbolsToIndexCustom</GetSymbolsToIndexDependsOn>
<SignWithMicrosoftKey>true</SignWithMicrosoftKey>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="ILRepack" 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);$(OutputPath)\NuGet.Core.dll" />
<BuildArtifacts Include="$(OutputPath)\NuGet.Core.dll" />
</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>$(ILRepack) $(PathToBuiltNuGetExe) /lib:$(OutputPath) @(BuildArtifacts->'%(fullpath)', ' ') /out:$(PathToMergedNuGetExe) @(MergeAllowDup -> '/allowdup:%(Identity)', ' ') /log:$(OutputPath)IlMergeLog.txt /allowduplicateresources</IlmergeCommand>
<IlmergeCommand Condition="'$(SkipSigning)' != 'true' And Exists($(AssemblyOriginatorKeyFile))">$(IlmergeCommand) /delaysign /keyfile:$(AssemblyOriginatorKeyFile)</IlmergeCommand>
</PropertyGroup>
<Error Condition="'$(ILRepack)' == ''" Text="ILRepack not found" />
<MakeDir Directories="$([System.IO.Path]::GetDirectoryName($(PathToMergedNuGetExe)))" />
<Exec Command="$(IlmergeCommand)" ContinueOnError="false" />
</Target>
<Target Name="GetSymbolsToIndexCustom" Returns="@(SymbolsToIndex)">
<ItemGroup>
<SymbolsToIndex Include="$(ArtifactsDirectory)$(VsixOutputDirName)\NuGet.Mssign.exe" />
<SymbolsToIndex Include="$(ArtifactsDirectory)$(VsixOutputDirName)\NuGet.Mssign.pdb" />
</ItemGroup>
</Target>
</Project>