Getting tired of msbuild failing because I had the service running, and liking the simplicity of only needing to rebuild an
asp.net mvc app for the changes to take effect I put together this quick host to run a topshelf service with shadow copy and reload it when the service is recompiled.
The host is not intended to be robust and is only suitable for development use.
I saw some other posts a while back asking about a similar thing, and I know a more robust Topshelf.Rehab is intended for the future but this works well enough for development.
To use, change the constants and compile to an exe (a simple csc DevHost.cs should work). In project properties, debug; change the debug start action to start an external program. Launch the application without debugging. Now you can just rebuild the project and the service will reload.