mirror of
https://github.com/brutaldev/StrongNameSigner.git
synced 2026-04-25 11:26:04 +03:00
[GH-ISSUE #82] Failed to resolve assembly: 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' #67
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kirillkovalenko on GitHub (Dec 27, 2022).
Original GitHub issue: https://github.com/brutaldev/StrongNameSigner/issues/82
Originally assigned to: @brutaldev on GitHub.
What could that error be?
~\.nuget\packages\brutal.dev.strongnamesigner\3.2.1\build\StrongNameSigner.Console.exe -a c:\users\kirill\.nuget\packages\ntapidotnet\1.1.33\lib\net461\NtApiDotNet.dll@kirillkovalenko commented on GitHub (Dec 27, 2022):
Just found out that it does work with 3.2.0. So it must be a regression.
@brutaldev commented on GitHub (Dec 30, 2022):
@kirillkovalenko Unfortuantely I cannot reproduce this:
@DanAvni commented on GitHub (Jan 15, 2023):
I am having the same issue
`
------ Build started: Project: Base, Configuration: Debug x86 ------
Restoring NuGet packages...
To prevent NuGet from downloading packages during build, open the Visual Studio Options dialog, click on the Package Manager node and uncheck 'Allow NuGet to download missing packages'.
All packages listed in packages.config are already installed.
---- Brutal Developer .NET Assembly Strong-Name Signer 3.3.2.0 ----
Console application to sign .NET assemblies with a strong-name key and fix assembly references.
Checking assembly references in 'D:\Develop\Project\packages\GeoTimeZone.5.2.0\lib\net462\GeoTimeZone.dll'.
Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
at Mono.Cecil.BaseAssemblyResolver.Resolve(AssemblyNameReference name, ReaderParameters parameters)
at Mono.Cecil.DefaultAssemblyResolver.Resolve(AssemblyNameReference name)
at Mono.Cecil.MetadataResolver.Resolve(TypeReference type)
at Mono.Cecil.Mixin.CheckedResolve(TypeReference self)
at Mono.Cecil.SignatureReader.ReadCustomAttributeEnum(TypeReference enum_type)
at Mono.Cecil.SignatureReader.ReadCustomAttributeElement(TypeReference type)
at Mono.Cecil.SignatureReader.ReadCustomAttributeConstructorArguments(CustomAttribute attribute, Collection
1 parameters) at Mono.Cecil.MetadataReader.ReadCustomAttributeSignature(CustomAttribute attribute) at Mono.Cecil.CustomAttribute.<Resolve>b__35_0(CustomAttribute attribute, MetadataReader reader) at Mono.Cecil.ModuleDefinition.Read[TItem](TItem item, Action2 read)at Mono.Cecil.CustomAttribute.Resolve()
at Mono.Cecil.CustomAttribute.get_HasConstructorArguments()
at System.Linq.Enumerable.WhereSelectEnumerableIterator
2.MoveNext() at System.Collections.Generic.List1..ctor(IEnumerable1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source)at Brutal.Dev.StrongNameSigner.SigningHelper.SignAssemblies(IEnumerable
1 assemblyInputOutputPaths, String keyFilePath, String keyFilePassword, String[] probingPaths) at Brutal.Dev.StrongNameSigner.Console.Program.SignAssemblies(Options options) at Brutal.Dev.StrongNameSigner.Console.Program.Main(String[] args) D:\Develop\Project\Libraries\Base\Base.vbproj(2619,5): error MSB3073: The command ""D:\Develop\Project\packages\Brutal.Dev.StrongNameSigner.3.3.2\build\StrongNameSigner.Console.exe" -in "..\..\packages\GeoTimeZone*\*\net462"" exited with code 1.The assembly does get signed but during cleanup something fails
@brutaldev commented on GitHub (Jan 15, 2023):
Created a .NET 4.6.2 console app and added GeoTimeZone.5.2.0 through NuGet and used the same console app arguments to sign it without any errors. I even just added the strong name signer NuGet package and running the build signs everything (all versions).
Do you have a sample project this happens on @DanAvni ?
@DanAvni commented on GitHub (Jan 16, 2023):
@brutaldev , when trying to create a sample project it worked so I have no idea what causes this on my solution but I did solve this by turning off the auto build and just including a call on BeforeBuild to the StrongName console to sign GeoTimeZone
@brutaldev commented on GitHub (Jan 21, 2023):
Found this to be the new feature that fixes custom attributes and sometimes it cannot resolve the types. Added handling around that so this is fixed up in v3.3.3 -
github.com/brutaldev/StrongNameSigner@7daf2405e7@janis-veinbergs commented on GitHub (Sep 5, 2023):
Using 3.3.3 and having exact/similar issue?
Cannot resolve builtin System assembly? Why so? I'm doing this via command line:
And getting:
Seems System.dll was loaded at some point, but within save operation it searches within funky paths but not within GAC:

Previously was using libphonenumber-csharp and it was complaining about not resolving netstandard.dll. I thought StrognNameSigned won't support netstandard, but looks like i'm out of luck against this lib too.
I am already long time user of StrongNameSigner and other projects are good.
However I'm now using .sdk style project and targeting net462... but I tried adding this .dll to be signed in a non-SDK style .net462 project and it still fails.
Downgraded to 3.2.0 and it also fails with same error, however the .unsigned file pops up :) But original .dll left unsigned.
@kirillkovalenko commented on GitHub (Sep 6, 2023):
@kirillkovalenko commented on GitHub (Nov 13, 2023):
The issue manifests itself with all the latest versions: 3.2.0, 3.3.3 and 3.4.0
I'm using VS 2022 on windows server 2022.
@brutaldev commented on GitHub (Nov 13, 2023):
@kirillkovalenko Please provide a link to a sample project that replicates this issue or add a unit test that shows the failure because I cannot reproduce it.
@kirillkovalenko commented on GitHub (Nov 13, 2023):
Here is a simple script that reproduces the issue on several machines in my lab
and here is a log file
@brutaldev commented on GitHub (Feb 5, 2024):
Fix in 3.5.0: https://github.com/brutaldev/StrongNameSigner/releases/tag/v3.5.0