Shadow copy and automatic reloading when developing

57 views
Skip to first unread message

chil...@gmail.com

unread,
Feb 2, 2016, 8:50:14 AM2/2/16
to topshelf-discuss
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.

Travis Smith

unread,
Feb 4, 2016, 10:58:51 AM2/4/16
to topshelf-discuss
This is cool, thanks for sharing!

--
You received this message because you are subscribed to the Google Groups "topshelf-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topshelf-discu...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
-Travis
Reply all
Reply to author
Forward
0 new messages