-
Notifications
You must be signed in to change notification settings - Fork 746
Expand file tree
/
Copy pathNuGet.Tools.csproj
More file actions
142 lines (126 loc) · 5.99 KB
/
NuGet.Tools.csproj
File metadata and controls
142 lines (126 loc) · 5.99 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
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Shipping>true</Shipping>
<IncludeInVSIX>true</IncludeInVSIX>
<RootNamespace>NuGetVSExtension</RootNamespace>
<GeneratePkgDefFile>true</GeneratePkgDefFile>
<TargetFramework>$(NETFXTargetFramework)</TargetFramework>
<CreateVsixContainer>false</CreateVsixContainer>
<DeployExtension>false</DeployExtension>
<Description>NuGet's Visual Studio extension Package.</Description>
<VSSDKTargetPlatformRegRootSuffix>Exp</VSSDKTargetPlatformRegRootSuffix>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\NuGet.Console\NuGet.Console.csproj" />
<!-- NuGet.PackageManagement.PowerShellCmdlets is referenced only to enable generation of .pkgdef entries via ProvideCodeBaseAttribute. -->
<ProjectReference Include="..\NuGet.PackageManagement.PowerShellCmdlets\NuGet.PackageManagement.PowerShellCmdlets.csproj" />
<!-- NuGet.VisualStudio.Implementation is referenced only to enable generation of .pkgdef entries via ProvideCodeBaseAttribute. -->
<ProjectReference Include="..\NuGet.VisualStudio.Implementation\NuGet.VisualStudio.Implementation.csproj" />
<!-- NuGet.VisualStudio.Interop is referenced only to enable generation of .pkgdef entries via ProvideCodeBaseAttribute. -->
<ProjectReference Include="..\NuGet.VisualStudio.Interop\NuGet.VisualStudio.Interop.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.VisualStudio.Sdk" />
<PackageReference Include="Microsoft.VSSDK.BuildTools" GeneratePathProperty="true" PrivateAssets="all" />
</ItemGroup>
<ItemGroup>
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="System" />
<Reference Include="System.ComponentModel.Composition" />
</ItemGroup>
<ItemGroup>
<Compile Update="Resources.Designer.cs">
<DependentUpon>Resources.resx</DependentUpon>
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
</Compile>
</ItemGroup>
<ItemGroup>
<VSCTCompile Include="NuGetTools.vsct">
<ResourceName>Menus.ctmenu</ResourceName>
<SubType>Designer</SubType>
</VSCTCompile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Update="Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Update="VSPackage.resx">
<MergeWithCTO>true</MergeWithCTO>
<ManifestResourceName>VSPackage</ManifestResourceName>
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<InternalsVisibleTo Include="DynamicProxyGenAssembly2" />
<InternalsVisibleTo Include="NuGet.Tools.Test" />
</ItemGroup>
<Target Name="DetermineGenerateProductVersionAssemblyInfoOutputs">
<ItemGroup>
<_ProductVersionAssemblyInfoFile Include="$(IntermediateOutputPath)ProductVersion.g$(DefaultLanguageSourceExtension)">
<Source>
<![CDATA[
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by $(MSBuildThisFileFullPath).
//
// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace $(RootNamespace)
{
public sealed partial class NuGetPackage
{
/// <summary>
/// The current version of the NuGet Visual Studio package which is displayed in the Help - About box of Visual Studio
/// </summary>
public const string ProductVersion = "$(SemanticVersion)"%3B
}
}
]]>
</Source>
</_ProductVersionAssemblyInfoFile>
<Compile Include="%(_ProductVersionAssemblyInfoFile.Identity)" />
<FileWrites Include="%(_ProductVersionAssemblyInfoFile.Identity)" />
</ItemGroup>
</Target>
<Target Name="GenerateProductVersionAssemblyInfo" BeforeTargets="GenerateAdditionalSources"
DependsOnTargets="DetermineGenerateProductVersionAssemblyInfoOutputs"
Inputs="$(MSBuildAllProjects)"
Outputs="@(_ProductVersionAssemblyInfoFile)">
<WriteLinesToFile
File="%(_ProductVersionAssemblyInfoFile.Identity)"
Lines="%(_ProductVersionAssemblyInfoFile.Source)"
Overwrite="true" />
</Target>
<!--
FROM: https://github.com/dotnet/arcade/blob/main/src/Microsoft.DotNet.Arcade.Sdk/tools/VisualStudio.VsixBuild.targets#L210-L239
This is a workaround for allowing neutral CTO resource produced from *.vsct to go in the main assembly.
We move the neutral *.cto file to be categorized as WithCulture=true,Culture=en to prevent the tools from falsely reporting:
error VSSDK1006: Two CTO files have the same Menus.ctmenu resource name.
Note that this categorization does not apply to the items that actually produce the .resources.dll and so it will
not cause an English satellite to be generated.
The documented way around this is to put all resources (including neutral/en) in satellites:
https://msdn.microsoft.com/en-us/library/ee943168.aspx
However, that has consequences we do not want:
- It breaks resx code-gen to *.designer.cs
- It causes extra dll loads in en case
- If we ever split satellites in to language packs, the english fallback satellites would become a special case.
-->
<Target Name="AssignEnCultureToNeutralCto" BeforeTargets="MergeCtoResource">
<ItemGroup>
<_GeneratedCTOFilesWithCulture Include="@(_GeneratedCTOFilesWithNoCulture)">
<Culture>en</Culture>
<WithCulture>true</WithCulture>
</_GeneratedCTOFilesWithCulture>
<_GeneratedCTOFilesWithNoCulture Remove="@(_GeneratedCTOFilesWithNoCulture)" />
<_ResourcesToMergeWithCTOWithCultureMetadata Condition="'%(WithCulture)' != 'true'">
<Culture>en</Culture>
<WithCulture>true</WithCulture>
</_ResourcesToMergeWithCTOWithCultureMetadata>
</ItemGroup>
</Target>
</Project>