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

.Net: Microsoft.SemanticKernel.Plugins.Memory.dll is delay-signed or test-signed assembly #3382

Closed
ksjoberg opened this issue Nov 3, 2023 · 7 comments · Fixed by #3497
Closed
Assignees
Labels
.NET Issue or Pull requests regarding .NET code

Comments

@ksjoberg
Copy link

ksjoberg commented Nov 3, 2023

Describe the bug
The assembly Microsoft.SemanticKernel.Plugins.Memory.dll fails to load on a Windows Server machine:

Could not load file or assembly 'Microsoft.SemanticKernel.Plugins.Memory' or one of its dependencies. 
Strong name signature could not be verified. The assembly may have been tampered with, or it was delay
signed but not fully signed with the correct private key. (Exception from HRESULT: 0x80131045) 

Checking the assembly with sn.exe -v yields:

sn -v Microsoft.SemanticKernel.Plugins.Memory.dll

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

Microsoft.SemanticKernel.Plugins.Memory.dll is a delay-signed or test-signed assembly

To Reproduce
Steps to reproduce the behavior:

  1. Verify that verification skipping is disabled, i.e. sn.exe -Vl for your architecture (x86/x64) shows
sn.exe -Vl

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

No verification entries registered
  1. Load the assembly into a runtime that verifies strongname signatures.

Expected behavior
The assembly should load without issues.

Platform

  • OS: Windows
  • Language: C#
  • Source: beta1, beta4
@shawncal shawncal added .NET Issue or Pull requests regarding .NET code triage labels Nov 3, 2023
@github-actions github-actions bot changed the title Microsoft.SemanticKernel.Plugins.Memory.dll is delay-signed or test-signed assembly .Net: Microsoft.SemanticKernel.Plugins.Memory.dll is delay-signed or test-signed assembly Nov 3, 2023
@RogerBarreto
Copy link
Member

RogerBarreto commented Nov 14, 2023

The Microsoft assemblies are signed only in the release packages.

To get a strong name, you need to follow this steps:

  1. Download the nuget package Microsoft.SemanticKernel.Plugins.Memory 1.0.0-beta6

Image

  1. Rename microsoft.semantickernel.plugins.memory.1.0.0-beta6.nupkg to microsoft.semantickernel.plugins.memory.1.0.0-beta6.zip
  2. Extract it
  3. Get the assembly file Microsoft.SemanticKernel.Plugins.Memory.dll from the lib/netstandard2.0 folder
  4. Check for the strong name like you did.
F:\check-assembly-strongname> sn -v Microsoft.SemanticKernel.Plugins.Memory.dll

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

Assembly 'Microsoft.SemanticKernel.Plugins.Memory.dll' is valid

@RogerBarreto
Copy link
Member

Closing this issue, for now.

Thanks for the feedback.

@Wopienkaatwork
Copy link

Hi @RogerBarreto I've just tried that and I still get:
C:\Users\WernerWopienka\Downloads\microsoft.semantickernel.plugins.memory.1.0.0-beta6\lib\netstandard2.0>sn -v Microsoft.SemanticKernel.Plugins.Memory.dll

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

Microsoft.SemanticKernel.Plugins.Memory.dll is a delay-signed or test-signed assembly

@RogerBarreto
Copy link
Member

RogerBarreto commented Nov 14, 2023

@Wopienkaatwork , please what was the Nuget Repository you attempted to download from ?

Ensure you got it from here: Microsoft.SemanticKernel.Plugins.Memory 1.0.0-beta6

@Wopienkaatwork
Copy link

@RogerBarreto , yes I took the link you provided, downloaded the nuget file, renamed it to zip, extracted it and used the vs2022 cmd prompt:
C:\Users\WernerWopienka\Downloads\microsoft.semantickernel.plugins.memory.1.0.0-beta6\lib\netstandard2.0>
sn -v Microsoft.SemanticKernel.Plugins.Memory.dll

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

Microsoft.SemanticKernel.Plugins.Memory.dll is a delay-signed or test-signed assembly
I also tried it via the nuget explorer with the same result.

@ksjoberg
Copy link
Author

I second this, just downloaded beta6 and tested:

> sn -v Microsoft.SemanticKernel.Plugins.Memory.dll

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

Microsoft.SemanticKernel.Plugins.Memory.dll is a delay-signed or test-signed assembly

$ sha256sum Microsoft.SemanticKernel.Plugins.Memory.dll
76a701d0aced588b01eeaaf9ca4a187766911d0d0b79e3102fb9d68c7d3417ee  Microsoft.SemanticKernel.Plugins.Memory.dll

@RogerBarreto
Copy link
Member

RogerBarreto commented Nov 14, 2023

Ok, will look deeper into this. Thanks for all updates.

@RogerBarreto RogerBarreto reopened this Nov 14, 2023
github-merge-queue bot pushed a commit that referenced this issue Nov 15, 2023
…ing (#3497)

### Motivation and Context

`SemanticKernel.Plugins.Memory` package was misconfigured in the
solution to not publish.

This ended up causing the package to not be correctly signed in the
pipeline.

Resolves #3382

The problem will be fixed in the next beta release.

### Contribution Checklist

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
.NET Issue or Pull requests regarding .NET code
Projects
Archived in project
6 participants