GCC编译的.EXE接收系统的installutill。
-
30-09-2019 - |
题
我正在尝试将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 通常是由某种不良清单引起的。有人可以在这里帮我吗?
解决方案
InstallUtil
用于安装.NET应用程序作为服务。除非GCC可以生产托管组件,否则您应该使用 sc.exe
而是为您的应用程序创建Windows服务条目。
不隶属于 StackOverflow