Monday, September 15, 2014

How to add a new worker role project to your cloud service solution


For unknown reason adding a new worker role project to a cloud service solution after the creation is not really supported by the Visual Studio 2012 UI (even with Update 3 or 4).

  1. Add a new class library project to you solution, this will be your worker role
  2. Unload the new project
  3. Open project as text file
  4. Add the following tag just before the first </PropertyGroup>
    • <RoleType>Worker</RoleType>
  5. Save the project and reload
  6. Right click no the node Roles from the cloud solution, select Add, the option Worker role in project solution should now be enable, Click on it
  7. This will open a dialog with your new project, select it.
  8. You have now a new worker role in your solution
  9. Add the following Nuget packages
    1. Windows Azure Configuration Manager
    2. Windows Azure Storage
  10. To get the C# code of the worker role class, if you do not have one already
    1. Create a new Cloud Service solution with a worker role
    2. Get the C# file WorkerRole.cs, add it to your new project
You are done


1 comment:

  1. Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging. If anyone wants to become a Front end developer learn from Node JS Online Training from India . or learn thru Javascript Online Training from India. Nowadays JavaScript has tons of job opportunities on various vertical industry. ES6 Online Training

    ReplyDelete