Open yangl1025 opened 5 days ago
System.BadImageFormatException is where you are deploying a x86 app trying to access x64 binaries (or x64 trying to load x86) . i'd look at your release build profile and what is being put into your installer. try and keep assemblies to AnyCPU where you can. exe target would typically be what would change, but even this isn't usually necessary unless you're accessing the registry etc.
have a read through https://stackoverflow.com/questions/8996653/troubleshooting-badimageformatexception for ideas on troubleshooting
Describe the bug 🐞
System.TypeInitializationException: “ReactiveUI.ViewForMixins”的类型初始值设定项引发异常。 ---> System.BadImageFormatException: 未能加载文件或程序集“System.ValueTuple, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51”或它的某一个依赖项。不应出于执行的目的加载引用程序集。只能在仅限反射的加载程序上下文中加载引用程序集。 (异常来自 HRESULT:0x80131058) ---> System.BadImageFormatException: 无法加载引用程序集来执行。
Step to reproduce
Reproduction repository
https://github.com/reactiveui/ReactiveUI
Expected behavior
when i run the vs ,it's ok。but I use the setup program ,when I install the msi ,the program throw exception。
Screenshots 🖼️
No response
IDE
Visual Studio 2022
Operating system
windows
Version
11
Device
windows
ReactiveUI Version
19.6.1
Additional information ℹ️
No response