-
Notifications
You must be signed in to change notification settings - Fork 19
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
Error: An attempt was made to load a program with an incorrect format #84
Comments
Nothing jumps out, both machines appear to be 64-bit. Can you try unchecking Prefer 32-bit? You might want to just build against x64 instead of Any CPU as well. The exception is only thrown when a 32-bit process tries to load a 64-bit assembly or visa versa. |
I tried both, none have worked. Wich archecture is the nuget of ManagedDism compiled with? |
I've downloaded the source, built with Any CPU and imported into my project and it worked! |
That's really weird, the assembly I published in the NuGet package is Any CPU
Did you have to modify how |
That's really weird! |
Can you please attach your locally built |
Sure! Here it is: |
That is very bizarre, everything seems to be the same. I'm going to do some minor cleanup and push a new package, maybe that'll work? |
We were also getting this same error on previous versions of windows, namely Windows Server 2016 x64. But that was because we were compiling the host application against x86... Not sure why Windows 10 allows it but it works there, just not on older versions. Solution for me: change application to use x64 or Any CPU |
I can confirm the bug report of @ConnorChristie . I will try @ConnorChristie 's workaround and change to host target to win-x64 for publish. |
First of all: thanks for sharing this well written library!
Situation
I've made an installer with WixSharp, in this installer i validate if the windows machine has the component "WCF-HTTP-Activation" activated. On some machines it's working, but in an azure Windows Server 2012 machine i'm having problems when i execute the code above.
See if you can help me!
Here's the code
Here's the error messages
An attempt was made to load a program with an incorrect format.
StackTrace
Project config
System where it's not working
System where it's working
The text was updated successfully, but these errors were encountered: