-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Sign Microsoft.Installation library package
#51488
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
nagilson
merged 3 commits into
dotnet:release/dnup
from
nagilson:nagilson-dnup-nuget-sign
Nov 3, 2025
+62
−2
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
src/Installer/Microsoft.Dotnet.Installation/Microsoft.Dotnet.Installation.sign.proj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
| <PropertyGroup> | ||
| <TargetFramework>net10.0</TargetFramework> | ||
| <!-- Determine repository root when the pipeline variables are unavailable (e.g. local invocations). --> | ||
| <_RepoRoot Condition="'$(RepoRoot)' != ''">$(RepoRoot)</_RepoRoot> | ||
| <_RepoRoot Condition="'$(_RepoRoot)' == ''">$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)..\..\..\'))</_RepoRoot> | ||
|
|
||
| <!-- Allow callers to override these directories; fall back to repo-relative defaults. --> | ||
| <PackagesDir Condition="'$(PackagesDir)' == ''">$(_RepoRoot)artifacts\packages\Release\</PackagesDir> | ||
| <IntermediateOutputPath Condition="'$(IntermediateOutputPath)' == ''">$(_RepoRoot)artifacts\obj\Sign\</IntermediateOutputPath> | ||
| <LogDir Condition="'$(LogDir)' == ''">$(_RepoRoot)artifacts\log\Sign\</LogDir> | ||
nagilson marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| <!-- SignTool requires explicit dotnet path; default to repo-local SDK. --> | ||
| <DotNetPath Condition="'$(DotNetPath)' == ''">$(_RepoRoot).dotnet\dotnet.exe</DotNetPath> | ||
|
|
||
| <MicroBuild_DoNotStrongNameSign>true</MicroBuild_DoNotStrongNameSign> | ||
| <MicroBuild_SigningEnabled>true</MicroBuild_SigningEnabled> | ||
| </PropertyGroup> | ||
|
|
||
| <Import Project="$(NuGetPackageRoot)microsoft.dotnet.signtool\$(MicrosoftDotNetSignToolVersion)\build\Microsoft.DotNet.SignTool.props" /> | ||
|
|
||
| <ItemGroup> | ||
| <FileExtensionSignInfo Include=".nupkg" CertificateName="NuGet" /> | ||
| <FileExtensionSignInfo Include=".dll" CertificateName="Microsoft400" /> | ||
| <FileSignInfo Include="Microsoft.Dotnet.Installation.dll" CertificateName="Microsoft400" /> | ||
| <FileSignInfo Include="Microsoft.Dotnet.Installation*.nupkg" CertificateName="NuGet" /> | ||
| <ItemsToSign Include="$(PackagesDir)**\Microsoft.Dotnet.Installation*.nupkg"> | ||
nagilson marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| <Authenticode>NuGet</Authenticode> | ||
| </ItemsToSign> | ||
| </ItemGroup> | ||
|
|
||
| <PropertyGroup Condition="'$(SignType)' == ''"> | ||
| <SignType>test</SignType> | ||
| <TestSign>true</TestSign> | ||
| </PropertyGroup> | ||
|
|
||
| <PropertyGroup Condition="'$(TestSign)' == ''"> | ||
| <TestSign>false</TestSign> | ||
| </PropertyGroup> | ||
|
|
||
|
|
||
| <Target Name="Sign" AfterTargets="Build"> | ||
| <Microsoft.DotNet.SignTool.SignToolTask | ||
| DryRun="false" | ||
| TestSign="$(TestSign)" | ||
| ItemsToSign="@(ItemsToSign)" | ||
| FileSignInfo="@(FileSignInfo)" | ||
| FileExtensionSignInfo="@(FileExtensionSignInfo)" | ||
| TempDir="$(IntermediateOutputPath)" | ||
| LogDir="$(LogDir)" | ||
| DoStrongNameCheck="false" | ||
| DotNetPath="$(DotNetPath)" | ||
| MicroBuildCorePath="$(NuGetPackageRoot)microsoft.visualstudioeng.microbuild.core\$(MicrosoftVisualStudioEngMicroBuildCoreVersion)" | ||
| SNBinaryPath="$(NuGetPackageRoot)sn\$(SNVersion)\sn.exe" | ||
| > | ||
| </Microsoft.DotNet.SignTool.SignToolTask> | ||
| </Target> | ||
| </Project> | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this necessary here? Isn't it set via the Arcade SDK which Directory.Build.props brings in?
If not, then this is probably a bit better (from Arcade):
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree - this is definitely an improvement. Thanks! It looks like some of the dirs don't populate properly without this - let's improve this in the publishing step so we can move forward.