6

I have a WCF service and a WorkerRole that I need to run at the same time. However, I can only set one of them as the StartUp project.

What could be done?

David Makogon
  • 69,407
  • 21
  • 141
  • 189
Dor
  • 902
  • 4
  • 24

1 Answers1

7

You shouldn't be setting either of your roles as startup project. Rather, you should be setting the cloud project itself as the startup project. Then, you can set breakpoints in both of your roles.

To test, I just created a brand new cloud project with a WCF Web Role and a Worker Role. I set a breakpoint in the OnStart() of each, and hit both breakpoints.

David Makogon
  • 69,407
  • 21
  • 141
  • 189
  • What if I want to run a WinForms program and a WCF WebRole at the same time? How would I go about this? – Dor May 30 '11 at 00:24
  • 7
    @Dor I realize I am replying to a very old comment, but for the sake of others that might stumble here, you can set multiple projects to startup in Visual Studio. Right click on the solution and select "Set startup Projects", then select the projects in the 'multiple startup projects' section. In your scenario you can set the Azure cloud project and the WinForms project to be startup projects. – Jarrod Nov 27 '12 at 16:18