Skip to content
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

Copy signed assemblies to the localize artifacts folder #6170

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

donnie-msft
Copy link
Contributor

@donnie-msft donnie-msft commented Nov 26, 2024

Bug

Fixes: https://github.com/NuGet/Client.Engineering/issues/3024

Description

  • Localization no longer copies NuGet assemblies to the output directory.
  • A new build step runs after localization and signing completes: Copy signed assemblies to localize artifacts folder
  • The build step runs an MSBuild target which copies the signed assemblies from artifacts\ to artifacts\localizationArtifacts\artifacts as shown in this binlog snippet:
    image

Validation of signed loc files:

Before this PR

Checking artifacts shows a test-signed assembly.

 sn -vf C:\users\____\Downloads\localizationArtifacts\localizationArtifacts\artifacts\NuGet.Credentials\bin\release\net8.0\NuGet.Credentials.dll

C:\users\____\Downloads\localizationArtifacts\localizationArtifacts\artifacts\NuGet.Credentials\bin\release\net8.0\NuGet.Credentials.dll is a delay-signed or test-signed assembly

After this PR

Checking artifacts shows a valid, signed assembly.

sn -vf C:\users\____\Downloads\Signed_localizationArtifacts\localizationArtifacts\artifacts\NuGet.Credentials\bin\release\net8.0\NuGet.Credentials.dll

Microsoft (R) .NET Framework Strong Name Utility  Version 4.0.30319.0
Copyright (c) Microsoft Corporation.  All rights reserved.

Assembly 'C:\users\____\Downloads\Signed_localizationArtifacts\localizationArtifacts\artifacts\NuGet.Credentials\bin\release\net8.0\NuGet.Credentials.dll' is valid

They are also Authenticode signed
image

PR Checklist

@donnie-msft donnie-msft marked this pull request as ready for review November 27, 2024 00:25
@donnie-msft donnie-msft requested a review from a team as a code owner November 27, 2024 00:25
Copy link
Contributor

@jeffkl jeffkl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🕺

inputs:
solution: "build\\loc.proj"
configuration: "$(BuildConfiguration)"
msbuildArguments: "/restore /t:CopyBinariesToLocalizationArtifacts /binarylogger:$(Build.StagingDirectory)\\binlog\\09.LocalizeFolderAssemblies.binlog"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: there's already a number 09 binlog, and when sorted, this binlog will be listed before the other 09, even though it runs afterwards.

I know there are quite a few lines to modify to give each a unique number, but we don't add or remove build steps very often, so I don't think it's unreasonable to update them all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants