-
Notifications
You must be signed in to change notification settings - Fork 745
Expand file tree
/
Copy pathNuGet.CommandLine.csproj
More file actions
165 lines (153 loc) · 7.92 KB
/
NuGet.CommandLine.csproj
File metadata and controls
165 lines (153 loc) · 7.92 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
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="ilmerge.props" />
<PropertyGroup>
<RootNamespace>NuGet.CommandLine</RootNamespace>
<AssemblyName>NuGet</AssemblyName>
<AssemblyTitle>NuGet Command Line</AssemblyTitle>
<PackageId>NuGet.CommandLine</PackageId>
<TargetFramework>$(NETFXTargetFramework)</TargetFramework>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<Description>NuGet Command Line Interface.</Description>
<ApplicationManifest>app.manifest</ApplicationManifest>
<Shipping>true</Shipping>
<OutputType>Exe</OutputType>
<SignWithMicrosoftKey>true</SignWithMicrosoftKey>
<ComVisible>false</ComVisible>
<!-- Pack properties-->
<PackProject>true</PackProject>
<IncludeBuildOutput>false</IncludeBuildOutput>
<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);CreateCommandlineNupkg</TargetsForTfmSpecificContentInPackage>
<SuppressDependenciesWhenPacking>true</SuppressDependenciesWhenPacking>
<DevelopmentDependency>true</DevelopmentDependency>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<UsePublicApiAnalyzer>false</UsePublicApiAnalyzer>
<GetSymbolsToIndexDependsOn>GetSymbolsToIndexCustom</GetSymbolsToIndexDependsOn>
</PropertyGroup>
<Target Name="CreateCommandlineNupkg">
<ItemGroup>
<TfmSpecificPackageFile Include="$(ArtifactsDirectory)$(VsixOutputDirName)\NuGet.exe">
<PackagePath>tools/</PackagePath>
</TfmSpecificPackageFile>
<TfmSpecificPackageFile Include="$(ArtifactsDirectory)$(VsixOutputDirName)\NuGet.pdb">
<PackagePath>tools/</PackagePath>
</TfmSpecificPackageFile>
</ItemGroup>
</Target>
<ItemGroup Label="NuGet Shared">
<Compile Include="$(SharedDirectory)\DeconstructionExtensions.cs" />
<Compile Include="$(SharedDirectory)\NoAllocEnumerateExtensions.cs" />
<Compile Include="$(SharedDirectory)\SharedExtensions.cs" />
<Compile Include="$(SharedDirectory)\TaskResult.cs" />
<Compile Include="$(SharedDirectory)\XmlUtility.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="Microsoft.Build.Utilities.v4.0" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System" />
<Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.ComponentModel.Composition.Registration" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" />
<Reference Include="NuGet.Core">
<HintPath>$(PkgNuGet_Core)\lib\net40-Client\NuGet.Core.dll</HintPath>
<Aliases>CoreV2</Aliases>
</Reference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="NuGet.Core" ExcludeAssets="All" GeneratePathProperty="true" />
<PackageReference Include="Microsoft.VisualStudio.Setup.Configuration.Interop" ExcludeAssets="Runtime" />
<ProjectReference Include="..\..\NuGet.Core\NuGet.PackageManagement\NuGet.PackageManagement.csproj" />
<ProjectReference Include="..\..\NuGet.Core\NuGet.Build.Tasks\NuGet.Build.Tasks.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="ILRepack" PrivateAssets="all" />
<PackageReference Include="System.Memory" />
<None Include="$(BuildCommonDirectory)\NOTICES.txt" Pack="true" PackagePath="\" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="..\..\..\LICENSE.txt" />
<EmbeddedResource Update="NuGetCommand.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>NuGetCommand.Designer.cs</LastGenOutput>
</EmbeddedResource>
<Compile Update="NuGetCommand.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>NuGetCommand.resx</DependentUpon>
</Compile>
<EmbeddedResource Update="NuGetResources.resx">
<!-- Strings are shared by other projects, use public strings. -->
<Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>NuGetResources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<Compile Update="NuGetResources.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>NuGetResources.resx</DependentUpon>
</Compile>
<!-- nuget.exe localized assemblies -->
<EmbeddedResource Include="$(OutputPath)\**\$(AssemblyName).resources.dll" Condition="'$(CI)' == 'true'" />
<!-- NuGet.Commands localized assemblies -->
<LocResource Include="$(OutputPath)\**\NuGet.Commands.resources.dll" Condition="'$(CI)' == 'true'" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="..\..\NuGet.Core\NuGet.Build.Tasks\NuGet.props">
<Link>NuGet.props</Link>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="..\..\NuGet.Core\NuGet.Build.Tasks\NuGet.targets">
<Link>NuGet.targets</Link>
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<InternalsVisibleTo Include="NuGet.CommandLine.FuncTest" />
<InternalsVisibleTo Include="NuGet.CommandLine.Test" />
</ItemGroup>
<Target Name="DetermineILMergeNuGetExeInputsOutputs">
<PropertyGroup>
<PathToBuiltNuGetExe>$(OutputPath)NuGet.exe</PathToBuiltNuGetExe>
<PathToMergedNuGetExe>$(ArtifactsDirectory)$(VsixOutputDirName)\NuGet.exe</PathToMergedNuGetExe>
</PropertyGroup>
<ItemGroup>
<!-- Dependent assemblies. Make sure NuGet.Core.dll is last. -->
<BuildArtifacts Include="$(OutputPath)\*.dll" Exclude="$(OutputPath)\NuGet.Core.dll" />
<BuildArtifacts Include="$(OutputPath)\NuGet.Core.dll" />
</ItemGroup>
<Message Text="$(MSBuildProjectName) -> $(PathToMergedNuGetExe)" Importance="High" />
</Target>
<!-- Since we are moving some code and strings from NuGet.CommandLine to NuGet.Commands, we opted to go through normal localization process
(build .resources.dll) and then add them to the ILMerged nuget.exe -->
<!-- This will also be called from CI build, after assemblies are localized, since our test infra takes nuget.exe before Localization -->
<Target Name="ILMergeNuGetExe"
AfterTargets="Build"
DependsOnTargets="DetermineILMergeNuGetExeInputsOutputs"
Inputs="$(PathToBuiltNuGetExe);@(BuildArtifacts)"
Outputs="$(PathToMergedNuGetExe)"
Condition="'$(BuildingInsideVisualStudio)' != 'true' and '$(SkipILMergeOfNuGetExe)' != 'true'" >
<PropertyGroup>
<IlmergeCommand>$(ILRepack) /lib:$(OutputPath) /out:$(PathToMergedNuGetExe) @(MergeAllowDup -> '/allowdup:%(Identity)', ' ') /log:$(OutputPath)IlMergeLog.txt /allowduplicateresources</IlmergeCommand>
<IlmergeCommand Condition="'$(SkipSigning)' != 'true' And Exists($(AssemblyOriginatorKeyFile))">$(IlmergeCommand) /delaysign /keyfile:$(AssemblyOriginatorKeyFile)</IlmergeCommand>
<IlmergeCommand>$(IlmergeCommand) $(PathToBuiltNuGetExe) @(BuildArtifacts->'%(fullpath)', ' ')</IlmergeCommand>
<IlmergeCommand>$(IlmergeCommand) @(LocResource->'%(fullpath)', ' ')</IlmergeCommand>
</PropertyGroup>
<Error Condition="'$(ILRepack)' == ''" Text="ILRepack not found" />
<MakeDir Directories="$([System.IO.Path]::GetDirectoryName($(PathToMergedNuGetExe)))" />
<Exec Command="$(IlmergeCommand)" ContinueOnError="false" />
</Target>
<!-- This strips away the framework assemblies from the resulting nuspec.-->
<Target Name="ClearFrameworkAssemblyReferences" BeforeTargets="GenerateNuspec" DependsOnTargets="$(GenerateNuspecDependsOn)">
<ItemGroup>
<_FrameworkAssemblyReferences Remove="@(_FrameworkAssemblyReferences)" />
</ItemGroup>
</Target>
<Target Name="GetSymbolsToIndexCustom" Returns="@(SymbolsToIndex)">
<ItemGroup>
<SymbolsToIndex Include="$(ArtifactsDirectory)$(VsixOutputDirName)\NuGet.exe" />
<SymbolsToIndex Include="$(ArtifactsDirectory)$(VsixOutputDirName)\NuGet.pdb" />
</ItemGroup>
</Target>
</Project>