1
votes

I'm having a windows service and a custom console install that should install it (among other things it does - so I can't use .msi installation from Setup Project).

The code uses installutil.exe to do the installation but 3.5 framework doesn't have this exe. How to install such service? It needs to run on both 32bit and 64bit and on machines that don't have VS, just framework 3.5

(I looked around the site and found several answers but none of them is applicable here)

Update: If I use version from 2.xx I get an exception:

System.BadImageFormatException: Could not load file or assembly xxx or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.

2

2 Answers

2
votes

The 3.5 framework does have that application.

Look in the directory

C:\Windows\Microsoft.NET\Framework\v2.0.50727\

or something similar. That is where installutil.exe lives for .NET 3.5 (it uses the same platform at .NET 2, which is why the folder is called as such).

So you should be able to call installutil.exe using that full path.

1
votes

The code uses installutil.exe to do the installation but 3.5 framework doesn't have this exe.

I have an out of the box installation of .net3.5 and it ships with installutil.exe

Look in

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727

Remember that .NET3.5 still runs on the .net2 runtime