In my case, I was using InstallUtil.exe
which was causing an error. To install the .Net Core
service in window best way to use sc
command.
More information here Exe installation throwing error The module was expected to contain an assembly manifest .Net Core