-
Notifications
You must be signed in to change notification settings - Fork 99
Publishing a singel file breaks the assembly for this library. #274
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
Comments
Unfortunately, to my knowledge, single file deployment does not work with libraries compiled with c++/cli. |
Any idea where i could start researching? What exactly is the issue, why cant I merge everything into one assembly? |
It's an issue with the dot net build tools apparently. I don't know any more unfortunately. |
I solved the problem through selfextracting and .net reflection |
Can you share your solution for this? I am running into the same problem and cant find a way :\ |
I recently tried publishing my project as a single file, by merging all the assemblies into to one exe, where I've used x86 on everything, but the screenrecorderlib assembly breaks.
System.BadImageFormatException
HResult=0x8007000B
Message=Could not load file or assembly 'ScreenRecorderLib, Version=1.0.8721.22425, Culture=neutral, PublicKeyToken=null'. An attempt was made to load a program with an incorrect format.
This exception was originally thrown at this call stack:
System.Runtime.Loader.AssemblyLoadContext.InternalLoad(System.ReadOnlySpan, System.ReadOnlySpan)
System.Reflection.Assembly.Load(byte[], byte[])
System.Reflection.Assembly.Load(byte[])
Costura.AssemblyLoader.ReadFromEmbeddedResources(System.Collections.Generic.Dictionary<string, string>, System.Collections.Generic.Dictionary<string, string>, System.Reflection.AssemblyName) in Common.cs
Costura.AssemblyLoader.ResolveAssembly(object, System.ResolveEventArgs) in ILTemplate.cs
System.Runtime.Loader.AssemblyLoadContext.InvokeResolveEvent(System.ResolveEventHandler, System.Reflection.RuntimeAssembly, string)
System.Runtime.Loader.AssemblyLoadContext.OnAssemblyResolve(System.Reflection.RuntimeAssembly, string)
Inner Exception 1:
BadImageFormatException: An attempt was made to load a program with an incorrect format. (0x8007000B)
The text was updated successfully, but these errors were encountered: