ServiceBase service error 193:0xc1 on Windows XP

前端 未结 5 617
不知归路
不知归路 2021-01-21 18:30

I have a service that I\'ve built using the C# ServiceBase class. It works when I run it in Windows 7 and Windows Server 2008; however, it doesn\'t work on Windows XP.

<

5条回答
  •  天命终不由人
    2021-01-21 18:57

    You must have compiled your exe either for .Net 4.5 or for 64-bit architecture (or both). This is the explanation of error code you run into from WinError.h:

    // %1 is not a valid Win32 application.
    //
    #define ERROR_BAD_EXE_FORMAT             193L
    

    Make sure you have compiled it for x86 platform or Any CPU, and whatever version of .Net Framework you compiled against is installed on the machine.

提交回复
热议问题