.net 3.5 - Installing Multiple Versions Of A Windows Service On The Same PC -


i have .net 3.5 windows service comes in several different configurations/flavours ie. release, test, debug etc. i've created installer package service built part of msbuild script, need able build installers in way allow each flavour of service installed on same machine. know best way this?

thanks

perhaps this article of help?

the problem

when reviewing serviceinstaller class using reflector, you'll see win32 call createservice in serviceinstaller.install method. createservice return error_duplicate_service_name return code whenever method called servicename or displayname parameter matches of installed service. causes win32exception thrown in above window , causes second install fail. can view complete documentation on createservice function here.

to around this, needs done dynamically set service name during installation , service startup known value , make sure value different each instance of service install.

the solution

all needs done make sure name of each service installation instance unique. need have copies of installation directories each service instance you'd have. finally, need able set service name dynamically during installation , startup. facilitated using app.config file.

the article continues providing step-by-step instructions on how can install multiple instances of .net windows service on same machine.

of course, can't wonder why need run debug , release version @ same time on same machine.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -