-
Notifications
You must be signed in to change notification settings - Fork 51
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
StrongNameKeyBlob method not found using .NET 4.7.2 #52
Comments
One of our developers experiences the same error with StrongNamer 0.2.5 and projects that target net472 only. |
I'm seeing the same issue with .net 4.8 @AndrewRybka @bgavrilMS Anyone know how to fix this or a workaround because I still need a strong name for my files but I also need to target .net 4.8 |
Well, the meta solution is for all dependencies to be strong named. Microsoft's guidance suggests this, even for open source projects. For example in MSAL we keep the full sn key in the public repo https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/blob/main/build/MSAL.snk ; Strong Naming is not a security feature, so this is doable. So my suggestion is to identify those dependencies which are not strong named (including those that use that partial strong-naming stuff, which can be considered obsolete).
All that being said, some external dependencies are still not signed (e.g. WebDriver.dll) and replacing them is not easy. We don't seem to have this problem on our test projects - running on NET6 and on .NET 4.8 |
msbuild
.Actual:
2>C:\Users\bogavril.nuget\packages\strongnamer\0.2.5\build\StrongNamer.targets(30,5): error MSB4018: The "StrongNamer.AddStrongName" task failed unexpectedly.
2>C:\Users\bogavril.nuget\packages\strongnamer\0.2.5\build\StrongNamer.targets(30,5): error MSB4018: System.MissingMethodException: Method not found: 'Void Mono.Cecil.WriterParameters.set_StrongNameKeyBlob(Byte[])'.
2>C:\Users\bogavril.nuget\packages\strongnamer\0.2.5\build\StrongNamer.targets(30,5): error MSB4018: at StrongNamer.AddStrongName.ProcessAssembly(ITaskItem assemblyItem, Byte[] keyBytes, StrongNamerAssemblyResolver resolver)
2>C:\Users\bogavril.nuget\packages\strongnamer\0.2.5\build\StrongNamer.targets(30,5): error MSB4018: at StrongNamer.AddStrongName.Execute()
2>C:\Users\bogavril.nuget\packages\strongnamer\0.2.5\build\StrongNamer.targets(30,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
2>C:\Users\bogavril.nuget\packages\strongnamer\0.2.5\build\StrongNamer.targets(30,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext()
Note: if I target just NetCore or NetFx it all works fine.
The text was updated successfully, but these errors were encountered: