BrilBroeder
BrilBroeder

Reputation: 1579

Install windows-service on sever 2016 (on prem) fails

I've created a windows service. It installs and works fine on my dev-machine and on win 2012 R2 servers. I tried to install the service on a 2016 server and it fails with the error :

An exception occurred while trying to find the installers in the C:\Program Files\xxx\xxx.AGENT.exe assembly. System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information. Aborting installation for C:\Program Files\xxx\xxx.AGENT.exe.

The install command is in a .bat file.

I start a command-prompt as admin. Change directories to the one containing the .bat file and run it.

This works fine on Win 2012, but not on Win 2016.

Any suggestions ?

Upvotes: 0

Views: 294

Answers (2)

BrilBroeder
BrilBroeder

Reputation: 1579

It turned out that .net 4.7.2 was missing on W2016 server. First (from folder names) it seemed that it was installed, but this tool revealed that 4.7 and not 4.7.2 was installed.

http://www.asoft.be/prod_netver.html

Upvotes: 0

Kasper Lagowski
Kasper Lagowski

Reputation: 69

To me this looks like a problem with the .dll files inside your service. Check the versions, configure every system references as "CopyLocal = true" and copy dlls to bin folder and see if that helps.

Upvotes: 1

Related Questions