mirror of
https://github.com/brutaldev/StrongNameSigner.git
synced 2026-04-25 11:26:04 +03:00
[GH-ISSUE #41] ASP core console signing problem #34
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 @Astimus on GitHub (Jul 27, 2017).
Original GitHub issue: https://github.com/brutaldev/StrongNameSigner/issues/41
Console signing doesn't work with asp .core applications.
There are diffrenet errors in console:
"Warning: Format of the executable (.exe) or library (.dll) is invalid"
"Error: Operation is not valid due to the current state of the object"
@brutaldev commented on GitHub (Jul 27, 2017):
The tool does not officially support signing .NET Core assemblies. PR is welcome if anyone wants to add this support.
@carlescs commented on GitHub (Mar 13, 2018):
The thing is that using the GUI tool to sign them and adding them as reference works. It does not work using the nuget package. Just my two cents...
@ffMathy commented on GitHub (Apr 30, 2018):
I really need this as well.
Currently just trying to sign a .NET Framework project that references a .NET Standard 1.6 class library, which I think is a very valid use case scenario and highly critical.
It could seem as if this could be resolved by just updating
Mono.Cecil@brutaldev?@brutaldev commented on GitHub (Apr 30, 2018):
@ffMathy There is a branch for the latest version of mono-cecil, however, they have internal file locking issues which make the unit tests fail as well as large signing batches not being able to complete.
@ffMathy commented on GitHub (Apr 30, 2018):
Alright. Is there an issue where progress on fixing that can be tracked or subscribed to?
@paul-kiar commented on GitHub (Jun 1, 2018):
I'm getting this error on .Net Framework assemblies, it signs successfully but then outputs errors
Operation is not valid due to the current state of the object. at Mono.Cecil.ModuleDefinition.ProcessDebugHeader() at Mono.Cecil.ModuleDefinition.ReadSymbols(ISymbolReader reader) at Mono.Cecil.ModuleReader.ReadSymbols(ModuleDefinition module, ReaderParameters parameters) at Mono.Cecil.ModuleReader.CreateModuleFrom(Image image, ReaderParameters parameters) at Mono.Cecil.ModuleDefinition.ReadModule(Stream stream, ReaderParameters parameters) at Mono.Cecil.ModuleDefinition.ReadModule(String fileName, ReaderParameters parameters) at Brutal.Dev.StrongNameSigner.SigningHelper.GetAssemblyInfo(String assemblyPath, String[] probingPaths) at Brutal.Dev.StrongNameSigner.AutomaticBuildTask.Execute()@brutaldev commented on GitHub (Jun 1, 2018):
@paul-kiar Update the the latest version.
@paul-kiar commented on GitHub (Jun 1, 2018):
@brutaldev I'm using 2.1.4, the latest package on nuget, including the prereleases.
@paul-kiar commented on GitHub (Jun 1, 2018):
The libraries I attempting to sign are 4.5.2 and 4.6.1
@paul-kiar commented on GitHub (Jun 1, 2018):
Specifically IdentityModel.OidcClient version 2.6.0 from nuget.
@paul-kiar commented on GitHub (Jun 1, 2018):
Turns out it's the project settings that were changed causing the error, I removed the project changes from my project and the errors stop. I then used console app and a pre-build event to sign the libraries. My project is being built in VS 2017 15.7.2 and the project target dotnet framework is 4.7.1.
@paul-kiar commented on GitHub (Jun 1, 2018):
This is the code I removed from the project:
<Import Project="..\..\..\packages\Brutal.Dev.StrongNameSigner.2.1.4\build\Brutal.Dev.StrongNameSigner.targets" Condition="Exists('..\..\..\packages\Brutal.Dev.StrongNameSigner.2.1.4\build\Brutal.Dev.StrongNameSigner.targets')" /> <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> <PropertyGroup> <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> </PropertyGroup> <Error Condition="!Exists('..\..\..\packages\Brutal.Dev.StrongNameSigner.2.1.4\build\Brutal.Dev.StrongNameSigner.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\Brutal.Dev.StrongNameSigner.2.1.4\build\Brutal.Dev.StrongNameSigner.targets'))" /> </Target>@brutaldev commented on GitHub (Aug 28, 2018):
This could be attempted again using v2.2.0.
A similar issue was found in issue #47 which was corrected in the latest update.