mirror of
https://github.com/brutaldev/StrongNameSigner.git
synced 2026-04-25 11:26:04 +03:00
[GH-ISSUE #31] Assembly reference not rewritten in XAML/BAML #27
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 @JVimes on GitHub (Feb 16, 2017).
Original GitHub issue: https://github.com/brutaldev/StrongNameSigner/issues/31
Originally assigned to: @brutaldev on GitHub.
I think I found an assembly reference that's not being rewritten by StrongNameSigner, and I may know where it is.
Repro steps:
xmlnsvalue assumes the above DLL and it's .NET namespace areWpfCustomControlLibrary1, so doctor it if necessary):Expected: The application runs.
Actual: It throws an exception, "FileLoadException: Could not load file or assembly 'WpfCustomControlLibrary1, PublicKeyToken=null' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)".
I may know where the un-rewritten reference is. I think it's an assembly self-reference in WpfCustomControlLibrary1.dll. That DLL contains a "generic.baml" resource (compiled from themes\generic.xaml in the project), and when I view it with dnSpy, there is a reference to the baml's own DLL, but with a null PublicKeyToken. I had to enable dnSpy's option: "View > Options > BAML decompiler > Disassemble BAML" to see the PublicKeyToken.
Edit: Looks like normal references (across assemblies) also aren't rewritten in XAML/BAML. Guessing XAML isn't yet supported.
@pp111 commented on GitHub (Aug 1, 2017):
Hello, I am having the same problem. Did you find a solution for this?
@brutaldev commented on GitHub (Aug 1, 2017):
Not yet, no time for this project at the moment.
@C1rdec commented on GitHub (Dec 1, 2017):
Any news on this issue?
Here is a simple repo: https://github.com/C1rdec/MaterialDesignStrongName
@brutaldev commented on GitHub (Dec 30, 2021):
Official release: https://www.nuget.org/packages/Brutal.Dev.StrongNameSigner/3.1.0