我正在尝试使用 GCC 编译的 .exe 作为 Windows 中的服务。根据我的研究,我应该这样做:
C:\Windows\Microsoft.net\Framework\v2.0.50727\InstallUtil.exe [program name]
虽然当我尝试这样做时,我收到这样的消息:
Exception occurred while initializing the installation:
System.BadImageFormatException: Could not load file or assembly 'file:///C:\Users\Chris\Documents\Visual Studio 2010\Projects\Setup4\Setup4\Service.exe' or one of its dependencies. The module was expected to contain an assembly manifest..
我有一种感觉,这是因为程序是使用 GCC 编译的,并且确实使用了一些 .a 文件进行编译。
从我所看到的System.BadImageFormatException通常是由某种不良清单引起的。有人可以在这里帮助我吗?