Closed JanssonTheBest closed 9 months ago
Unfortunately, to my knowledge, single file deployment does not work with libraries compiled with c++/cli.
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.
How would I do this?
https://learn.microsoft.com/en-us/nuget/quickstart/install-and-use-a-package-in-visual-studio
I solved the problem through selfextracting and .net reflection
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)