我尝试使用InstallUtil.exe从VC ++ MFC项目安装Windows服务,并收到如下错误消息。
C:\Users\p.gamage\Documents\Visual Studio 2015\Projects\MFCDatabaseTuts\x64\Debug>installutil MFCDatabaseTuts.exe
Microsoft (R) .NET Framework Installation utility Version 4.7.2046.0
Copyright (C) Microsoft Corporation. All rights reserved.
Exception occurred while initializing the installation:
System.BadImageFormatException: Could not load file or assembly 'file:///C:\Users\p.gamage\Documents\Visual Studio 2015\Projects\MFCDatabaseTuts\x64\Debug\MFCDatabaseTuts.exe'
or one of its dependencies. The module was expected to contain an assembly manifest..
我用google搜索错误,很多博客,论坛包括Stackoverflow说,这可能是32位与64位兼容性问题。但我使用x64位系统。并且还为x64构建了。
为什么会这样?任何帮助将不胜感激。
感谢。