Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I run my windows service as 64 bit

Tags:

.net

service

I have a windows service. In the Properties I have the platform target set as X64. In my csproj file I have changed all instances of prefer32bit to false. I am installing the service with installutil.exe when I install and run my service it runs as 32 bit. I am currently building in debug mode. What am I missing here?

like image 385
user3839756 Avatar asked Apr 18 '16 16:04

user3839756


1 Answers

You need to use the 64bit version of installutil.exe to install for 64bit. The normal 32bit version cannot do this.

You can find it in

%WINDIR%\Microsoft.NET\Framework64\ $VERSION \InstallUtil.exe

instead of

%WINDIR%\Microsoft.NET\Framework\ $VERSION \InstallUtil.exe

like image 65
nvoigt Avatar answered Sep 19 '22 08:09

nvoigt