Hi, I have written a windows service using Visual Studio 2022. The service utilises an IBM Library that was pulled into the project using Visual Studio's NuGet package manager.
I tested the code beforehand by writing a class library and testing it in a class module (vb). It worked once the IBM Library was pulled into the Console Application via the NuGet package manager.
I want to use this code as a windows service, so I wrote a Service, and pulled in the code. The class module has a single public sub which does all the work. The service calls that Sub. Again, I added the DLL to the project via the NuGet package manager.
When you compile the service, it appears to put the exe and related DLLs in the release folder.
I copied these files to a C:\Program Files\ area and installed the service using the .NET installutil utility.
However, when I run up the service, I get this error:
tmrService_Tick() failed:Could not load file or assembly 'amqmxmsstd, Version=9.2.5.0, Culture=neutral, PublicKeyToken=d2666ab12fca862b' or one of its dependencies. The system cannot find the file specified.
Interestingly, the compiled console application DOES work when I run the EXE...but I can't seem to get the service to start. How do I distribute the windows service exe and related DLLs so that the service will start?
If there are dependencies to amqmxmsstd, how would I work out what they are?