I'm facing a weird problem and I can't find a working solution. Thanks in advance for any help.
I developed a Windows Service in C# that use Newtonsoft.JSON library to parse the result from a bunch of WebAPI. The service is deployed with MSI and everything was working perfectly.
The first version of the service was using Newtonsoft.JSON 6.0.8, but recently I moved to version 11.0.2.
I packed a new MSI (with correct version/Product Id/Upgrade Id to ensure upgrading) and I'm trying to deploy the new version through a small install application that is performing the following:
- Stop the service (if installed and running) with a System.ServiceProcess.ServiceController
- Uninstall the service with a
System.ServiceProcess.ServiceController
- Run a
System.Process
that invokes msiexec on the new msi file
The result: the service is not working, and from the log, I can see that the application is still looking for the 6.0.8 version of Newtonsoft.JSON.
If I try the following:
- Right-click on msi -> Uninstall
- Right-click on msi -> Install
Everything is working fine and the service uses the version 11.0.2 of the library...
I'm going crazy about this... How can I fix/clean the upgrade process?
Thanks in advance