question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Netstandard1.3 DLL from the latest nuget is not correctly SNK signed

See original GitHub issue

Platform

What platform is your issue or question related to? (Delete other platforms).

  • .NET HTML
  • .NET WPF
  • UWP

Author or host

Host

Version of SDK

Nuget 1.2.1

Issue

I spent all day today struggling with an issue when loading the AdaptiveCards netstandard1.3 library into my project (indirectly, via a bunch of complicated Assembly.Load() / AppDomain stuff that is only semi-relevant). Every time, my program would fail at startup with the exception:

FileLoadException: Could not load file or assembly 'AdaptiveCards, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. Strong name validation failed. (Exception from HRESULT: 0x8013141A)

After much frustration I discovered that the netstandard1.3 dll was different from the other two in terms of strong name signing, in that it was only delay-signed but not “fully” validated. This is what was causing my runtime to fail to load them. Validating them manually with Sn.exe shows this:

C:\WINDOWS\system32>Sn -v "C:\Users\lostromb\Desktop\adaptivecards\net452\AdaptiveCards.dll"

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

Assembly 'C:\Users\lostromb\Desktop\adaptivecards\net452\AdaptiveCards.dll' is valid

C:\WINDOWS\system32>Sn -v "C:\Users\lostromb\Desktop\adaptivecards\netstandard2.0\AdaptiveCards.dll"

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

Assembly 'C:\Users\lostromb\Desktop\adaptivecards\netstandard2.0\AdaptiveCards.dll' is valid

C:\WINDOWS\system32>Sn -v "C:\Users\lostromb\Desktop\adaptivecards\netstandard1.3\AdaptiveCards.dll"

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

C:\Users\lostromb\Desktop\adaptivecards\netstandard1.3\AdaptiveCards.dll is a delay-signed or test-signed assembly

Of course one option is to upgrade my project to one of the other runtimes, but my project is plugin-based and I’m trying to maintain the broadest level of compatability which is why I’d prefer to target the lower version. Would it be possible to fix this simple issue in the next release?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
paulcam206commented, Aug 9, 2019

just a heads up – this fix should be shipping in 1.2.2 either today or Monday 😃

1reaction
shalinijoshi19commented, Aug 9, 2019

@paulcam206 does this mean we’ll need to issue a patch to fix the signing for 1.2.1 binaries? Now that we have the new certs as well, let’s target sometime today to republish?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix "Referenced assembly does not have a strong ...
The above steps work fine unless your third-party assembly (A.dll) references another library (B.dll) which also has to be signed. You can ...
Read more >
NuGet package manager not detecting new versions in feed
I make a change in the nuget package project and push it. The package successfully builds and is uploaded to myget. I update...
Read more >
Troubleshooting NuGet Package Restore in Visual Studio
This error occurs when you attempt to build a project that contains references to one or more NuGet packages, but those packages are...
Read more >
Newtonsoft.Json 13.0.3
Requires NuGet 2.12 or higher. .NET CLI; Package Manager ... Json --version 13.0.3 ... Sizes = new string[] { "Small" }; string json...
Read more >
Unable to resolve dependencies of NuGet packages
All NuGet package, Visual Studio throws the following error: Unable to resolve dependencies. 'Progress.Sitefinity.Authentication 10.0.6421' is not ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found