I have implemented windows service
using .Net Core
worker service
. When installing service from command prompt, getting error
C:\Windows\Microsoft.NET\Framework64\v4.0.30319>InstallUtil.exe D:\LC\WindowService\L3WorkerService.exe
Microsoft (R) .NET Framework Installation utility Version 4.8.3752.0
Copyright (C) Microsoft Corporation. All rights reserved.
Exception occurred while initializing the installation:
System.BadImageFormatException: Could not load file or assembly
'file:///D:\LC\WindowService\L3WorkerService.exe' or one of its dependencies.
The module was expected to contain an assembly manifest..
I have tried with these two path
C:\Windows\Microsoft.NET\Framework64\v4.0.30319>InstallUtil.exe D:\LC\WindowService\L3WorkerService.exe
C:\Windows\Microsoft.NET\Framework\v4.0.30319>InstallUtil.exe D:\LC\WindowService\L3WorkerService.exe
This is my project information
- Platform target - x86
- Output type - WindowsApplication
- Target Framework - .NET Core 3.1
How can I fix this issue?