-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
WPF ARM64 app crashes on startup, unless assemblies are somewhat forcibly loaded #6458
Comments
Did I post this in the correct place? |
Can you please share a sample/minimal repro for the bug? |
I got to download .NET7 and repackage the app to check. |
Yeah, with .NET 7 Preview 3, the app loads normally. |
Awesome |
Marking this as closed since the PR for this is already merged and will be available in servicing release 6.0.6. Thanks! |
Hi, I have been getting
BadImageException
's when loading my WPF app exported as arm64.These are the publishing settings, but not that it also happens with single file (on/off) and framework-dependant as well.
The line that triggers the issue looks like this:
Removing that line just makes the app crash in the next line (a
FindResource()
call).As previously discussed in #6286, at first, I thought it could be related to some of my projects (or dependencies, such as SharpDX) being exported as x86 and failing to load.
So, I decided to export as self-contained + not as single file, to be able to scan all assemblies.
I simply added a method to execute a for loop before the app passed though the line that triggered the crash, calling
AssemblyName.GetAssemblyName(name)
for all assemblies in the same folder.By doing that, the app worked normally (note that if I remove the call to the method that runs over all DLLs, the app crashes).
Why does that work?
I can't do that normally in my app, as I export as a single file.
The text was updated successfully, but these errors were encountered: