Skip to content

Commit 42dd5a9

Browse files
committed
Add MicroBuild dependency and signing of output DLLs (#6344)
Progress on https://github.com/NuGet/Engineering/issues/1577
1 parent 43f7032 commit 42dd5a9

7 files changed

Lines changed: 51 additions & 6 deletions

File tree

build.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ param (
1010
[string]$PackageSuffix,
1111
[string]$Branch,
1212
[string]$CommitSHA,
13-
[string]$BuildBranch = '9f570166c49e93a911e54505a8041f3a123e69b1'
13+
[string]$BuildBranch = '306fec22edac68336d7e32124d51248734c3a395'
1414
)
1515

1616
Set-StrictMode -Version 1.0

src/NuGet.Services.Search.Client/NuGet.Services.Search.Client.csproj

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@
6767
</None>
6868
</ItemGroup>
6969
<ItemGroup>
70+
<PackageReference Include="MicroBuild.Core">
71+
<Version>0.3.0</Version>
72+
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
73+
<PrivateAssets>all</PrivateAssets>
74+
</PackageReference>
7075
<PackageReference Include="Microsoft.AspNet.WebApi.Client">
7176
<Version>5.2.3</Version>
7277
</PackageReference>
@@ -81,4 +86,11 @@
8186
</PackageReference>
8287
</ItemGroup>
8388
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
89+
<PropertyGroup>
90+
<SignPath>..\..\build</SignPath>
91+
<SignPath Condition="'$(BUILD_SOURCESDIRECTORY)' != ''">$(BUILD_SOURCESDIRECTORY)\build</SignPath>
92+
<SignPath Condition="'$(NuGetBuildPath)' != ''">$(NuGetBuildPath)</SignPath>
93+
</PropertyGroup>
94+
<Import Project="$(SignPath)\sign.targets" Condition="Exists('$(SignPath)\sign.targets')" />
95+
<Import Project="$(SignPath)\sign.microbuild.targets" Condition="Exists('$(SignPath)\sign.microbuild.targets')" />
8496
</Project>

src/NuGetGallery.Core/NuGetGallery.Core.csproj

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,11 @@
233233
<PackageReference Include="EntityFramework">
234234
<Version>6.1.3</Version>
235235
</PackageReference>
236+
<PackageReference Include="MicroBuild.Core">
237+
<Version>0.3.0</Version>
238+
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
239+
<PrivateAssets>all</PrivateAssets>
240+
</PackageReference>
236241
<PackageReference Include="Microsoft.Azure.KeyVault.Core">
237242
<Version>1.0.0</Version>
238243
</PackageReference>
@@ -269,7 +274,10 @@
269274
</ItemGroup>
270275
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
271276
<PropertyGroup>
272-
<NuGetBuildPath Condition="'$(NuGetBuildPath)' == ''">..\..\build</NuGetBuildPath>
277+
<SignPath>..\..\build</SignPath>
278+
<SignPath Condition="'$(BUILD_SOURCESDIRECTORY)' != ''">$(BUILD_SOURCESDIRECTORY)\build</SignPath>
279+
<SignPath Condition="'$(NuGetBuildPath)' != ''">$(NuGetBuildPath)</SignPath>
273280
</PropertyGroup>
274-
<Import Project="$(NuGetBuildPath)\sign.targets" Condition="Exists('$(NuGetBuildPath)\sign.targets')" />
281+
<Import Project="$(SignPath)\sign.targets" Condition="Exists('$(SignPath)\sign.targets')" />
282+
<Import Project="$(SignPath)\sign.microbuild.targets" Condition="Exists('$(SignPath)\sign.microbuild.targets')" />
275283
</Project>

src/NuGetGallery/NuGetGallery.csproj

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2016,6 +2016,11 @@
20162016
<PackageReference Include="Lucene.Net.Contrib">
20172017
<Version>3.0.3</Version>
20182018
</PackageReference>
2019+
<PackageReference Include="MicroBuild.Core">
2020+
<Version>0.3.0</Version>
2021+
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
2022+
<PrivateAssets>all</PrivateAssets>
2023+
</PackageReference>
20192024
<PackageReference Include="Microsoft.ApplicationInsights">
20202025
<Version>2.2.0</Version>
20212026
</PackageReference>
@@ -2181,9 +2186,6 @@
21812186
<PackageReference Include="NuGet.Services.Owin">
21822187
<Version>2.2.3</Version>
21832188
</PackageReference>
2184-
<PackageReference Include="NuGet.Services.Platform.Client">
2185-
<Version>3.0.29-r-master</Version>
2186-
</PackageReference>
21872189
<PackageReference Include="NuGet.Services.Sql">
21882190
<Version>2.27.0</Version>
21892191
</PackageReference>
@@ -2238,6 +2240,13 @@
22382240
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
22392241
</PropertyGroup>
22402242
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
2243+
<PropertyGroup>
2244+
<SignPath>..\..\build</SignPath>
2245+
<SignPath Condition="'$(BUILD_SOURCESDIRECTORY)' != ''">$(BUILD_SOURCESDIRECTORY)\build</SignPath>
2246+
<SignPath Condition="'$(NuGetBuildPath)' != ''">$(NuGetBuildPath)</SignPath>
2247+
</PropertyGroup>
2248+
<Import Project="$(SignPath)\sign.targets" Condition="Exists('$(SignPath)\sign.targets')" />
2249+
<Import Project="$(SignPath)\sign.microbuild.targets" Condition="Exists('$(SignPath)\sign.microbuild.targets')" />
22412250
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
22422251
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
22432252
<Target Name="MvcBuildViews" AfterTargets="AfterBuild" Condition="'$(MvcBuildViews)'=='true'">

src/NuGetGallery/Properties/AssemblyInfo.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@
1414
[assembly: AssemblyTrademark("")]
1515
[assembly: AssemblyCulture("")]
1616

17+
#if SIGNED_BUILD
18+
[assembly: InternalsVisibleTo("NuGetGallery.Facts, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
19+
#else
1720
[assembly: InternalsVisibleTo("NuGetGallery.Facts")]
21+
#endif
1822

1923
#if !PORTABLE
2024
[assembly: ComVisible(false)]

tests/NuGetGallery.Core.Facts/NuGetGallery.Core.Facts.csproj

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,4 +141,10 @@
141141
</PackageReference>
142142
</ItemGroup>
143143
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
144+
<PropertyGroup>
145+
<SignPath>..\..\build</SignPath>
146+
<SignPath Condition="'$(BUILD_SOURCESDIRECTORY)' != ''">$(BUILD_SOURCESDIRECTORY)\build</SignPath>
147+
<SignPath Condition="'$(NuGetBuildPath)' != ''">$(NuGetBuildPath)</SignPath>
148+
</PropertyGroup>
149+
<Import Project="$(SignPath)\sign.targets" Condition="Exists('$(SignPath)\sign.targets')" />
144150
</Project>

tests/NuGetGallery.Facts/NuGetGallery.Facts.csproj

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,4 +316,10 @@
316316
</PackageReference>
317317
</ItemGroup>
318318
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
319+
<PropertyGroup>
320+
<SignPath>..\..\build</SignPath>
321+
<SignPath Condition="'$(BUILD_SOURCESDIRECTORY)' != ''">$(BUILD_SOURCESDIRECTORY)\build</SignPath>
322+
<SignPath Condition="'$(NuGetBuildPath)' != ''">$(NuGetBuildPath)</SignPath>
323+
</PropertyGroup>
324+
<Import Project="$(SignPath)\sign.targets" Condition="Exists('$(SignPath)\sign.targets')" />
319325
</Project>

0 commit comments

Comments
 (0)