System.BadImageFormatException: Format of the executable (.exe) or library (.dll) is invalid.
at Mono.Cecil.PE.ImageReader.ReadImage()
at Mono.Cecil.PE.ImageReader.ReadImage(Disposable1 stream, String file_name) at Mono.Cecil.ModuleDefinition.ReadModule(Disposable1 stream, String fileName, ReaderParameters parameters)
at Mono.Cecil.ModuleDefinition.ReadModule(String fileName, ReaderParameters parameters)
at ApiUpdater.MovedFromOptimizer.Program.CollectMovedFromTypeNamesFromAssembly(String assemblyPath, StreamWriter outputFile, IAPIUpdaterListener logger)
at ApiUpdater.MovedFromOptimizer.Program.RealMain(String[ ] args)
at ApiUpdater.MovedFromOptimizer.Program.Main(String[ ] args)
Unity 2023.3.21f1. I’ve seen another thread of someone having the same issue but that was only with building their project. I’m having this issue as the first thing I see when I open up any project.
Specifically when reinstalling, make sure antivirus is disabled (doubly so if that antivirus has “bit” and “defender” in its name) and don’t enable it until after you’ve excluded the install folder from antivirus checks.
If it happens to be BitDefender: uninstall, it’s more malware than anything.
I’m getting this error when trying to open a Unity project
System.NullReferenceException: Object reference not set to an instance of an object
at ApiUpdater.MovedFromOptimizer.Program.CollectMovedFromTypeNamesFromAssembly(String assemblyPath, StreamWriter outputFile, IAPIUpdaterListener Logger