Creating a Windows Service with Deployment Manager
swinghouse
Posts: 120 Bronze 2
Thanks David,
Yes, setting up .config transforms for other types of .NET applications in Deployment Manager proved to be smooth sailing indeed! Great stuff!
May I inquire about another thing? How should I go about registering Windows Services in a Deployment Manager release? Should I create a PowerShell script and put in in Deploy.ps1?
/Mattias
PS. Please let me know if I should start a new thread instead of prolonging this one.
Yes, setting up .config transforms for other types of .NET applications in Deployment Manager proved to be smooth sailing indeed! Great stuff!
May I inquire about another thing? How should I go about registering Windows Services in a Deployment Manager release? Should I create a PowerShell script and put in in Deploy.ps1?
/Mattias
PS. Please let me know if I should start a new thread instead of prolonging this one.
Comments
David Conlin is on holiday, so I will be dealing with your query.
You can create 4 kinds of Powershell scripts with Deployment Manager:
-PreDeploy.ps1 -Deploy.ps1 -PostDeploy.ps1 -DeployFailed.ps1
You may not have come across this help page about creating/updating Windows service from a Powershell script:http://www.red-gate.com/supportcenter/Content/Deployment_Manager/help/1.0/dm_powershell_scripts
If you have any other problems, please let us know. I hope this helps!
Software Engineer - Deployment Manager
Red Gate
Thanks for the information - very useful!
I have one issue at the moment. Deployment Manager doesn't seem to pick up the .ps1 files in the NuGet package. I get this message while deploying:
My .ps1 files, currently PreDeploy.ps1 and PostDeploy.ps1, are located at the root of my NuGet package.
What might I be doing wrong?
/Mattias
After upgrading the version number of my NuGet package and pointing Deployment Manager at the new version, Deployment Manager picked up my changes and executed the PowerShell scripts!
/Mattias
Otherwise Deployment Manager, very helpfully, reported the following error message:
Very nice!
/Mattias
I am glad you got Deployment Manager configured to use preDeploy and postDeploy scripts.
Currently, whenever you make changes to your package, you need to increment the version number for the changes to be picked up. We are aware of this and would be looking to fix this in the near future.
Please let us know if you have any further queries.
Thanks!
Software Engineer - Deployment Manager
Red Gate