开发者

Setup and Deployment does not work

I am working on VS 2008 and 3.5 framework. I had three windows services. I placed all t开发者_如何学编程hree in a single solution, created installer individually for each of them. Then created a setup project. When I build it says build failed . But I checked on the errorlist, (i enabled the diagnostics in options menu), but there was no error at all. I went ahead and installed. There were no issues, But there was no service showed up in the services.msc.

I installed each service individually , using installutil command, it showed up. But my requirement is to bundle these services and deploy to the client. The client should install it.

Where am I going wrong. Any inputs will be highly appreciated.

Regards cmrhema


I notice your comment above about omitting the custom action. Same mistake I made! For posterity, here's the entire process:

  1. Make sure you have added the project installer to your service project (described here). These components give your service EXE the ability to register itself with the service manager.
  2. Add a setup project to your solution.
  3. Add the primary output from your service project to the setup project (described here). This puts the binary into the application directory.
  4. Add a custom deployment action to your setup project containing the primary output from your service project. This looks like a repeat of step 3, but what it's actually doing here is registering your service with the service manager.

This walkthrough goes through each of these steps in some detail.


I too have a similar problem with VS 2008 and I believe it is a bug in the IDE rather than anything you're doing wrong.

Basically what happens is that VS reports a failed build, but does not indicate any reason for the failure. I find that restarting Visual Studio and then performing another build allows the build to succeed.

I read somewhere that for some people the bug is caused by some auto-created project file, but a restart fixes the problem for me.


Build failed -> what else is there in the Output window?

For some general reference regarding setup projects for windows services in .net: http://msdn.microsoft.com/en-us/library/aa983650%28VS.71%29.aspx

http://support.microsoft.com/kb/317421

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜