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).
- Add a new class library project to you solution, this will be your worker role
- Unload the new project
- Open project as text file
- Add the following tag just before the first </PropertyGroup>
- <RoleType>Worker</RoleType>
- Save the project and reload
- 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
- This will open a dialog with your new project, select it.
- You have now a new worker role in your solution
- Add the following Nuget packages
- Windows Azure Configuration Manager
- Windows Azure Storage
- To get the C# code of the worker role class, if you do not have one already
- Create a new Cloud Service solution with a worker role
- Get the C# file WorkerRole.cs, add it to your new project
You are done
No comments:
Post a Comment