Random cloud service error during solution building
Hello. I have several azure cloud services in my solution. Periodically, my build goes down. I getting a message "The role 'MainWorkerRole' was not found in the service definition. Parameter name: roleName" . Build falls with a probability of about 50 percent. What could be causing this problem? Published whether services in the construction of the build?
August 31st, 2015 9:32am

Hi,

 I am quoting the solution from the below article.
 http://virtocommerce.blogspot.in/2013/05/building-and-publishing-azure-solution.html
 
 C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Windows Azure Tools\2.0\Microsoft.WindowsAzure.targets (632): The role 'SchedulerWorkerRole' was not found in the service definition. Parameter name: roleName

 The simple solution is to add "/m:1" argument to the "MSBuild Arguments" for the Build definition. So your full MSBuild Arguments field will look something like this:

/t:Publish  /p:TargetProfile=Cloud /Property:PublishDir="//testserver/Deployment/BuildTemp/" /m:1

 Explanation of why it works
  In our solution we have several worker roles and web roles as part of the solution. With Azure SDK 2.0 and TFS Build all files including ServiceDefinition.csdef are copied to the single output directory. By default TFS Build includes /m flag which uses multiple threads (= number of cores) to build a solution. They can result in projects built in slightly different order and overwriting of the ServiceDefinition file, setting it to use a single thread resolve this issue.


Regards,
Nithin Rathnakar

Disclaimer: This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.


Free Windows Admin Tool Kit Click here and download it now
August 31st, 2015 1:03pm

Hi,

 I am quoting the solution from the below article.
 http://virtocommerce.blogspot.in/2013/05/building-and-publishing-azure-solution.html
 
 C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Windows Azure Tools\2.0\Microsoft.WindowsAzure.targets (632): The role 'SchedulerWorkerRole' was not found in the service definition. Parameter name: roleName

 The simple solution is to add "/m:1" argument to the "MSBuild Arguments" for the Build definition. So your full MSBuild Arguments field will look something like this:

/t:Publish  /p:TargetProfile=Cloud /Property:PublishDir="//testserver/Deployment/BuildTemp/" /m:1

 Explanation of why it works
  In our solution we have several worker roles and web roles as part of the solution. With Azure SDK 2.0 and TFS Build all files including ServiceDefinition.csdef are copied to the single output directory. By default TFS Build includes /m flag which uses multiple threads (= number of cores) to build a solution. They can result in projects built in slightly different order and overwriting of the ServiceDefinition file, setting it to use a single thread resolve this issue.


Regards,
Nithin Rathnakar

Disclaimer: This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.


August 31st, 2015 5:01pm

Hi,

 I am quoting the solution from the below article.
 http://virtocommerce.blogspot.in/2013/05/building-and-publishing-azure-solution.html
 
 C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Windows Azure Tools\2.0\Microsoft.WindowsAzure.targets (632): The role 'SchedulerWorkerRole' was not found in the service definition. Parameter name: roleName

 The simple solution is to add "/m:1" argument to the "MSBuild Arguments" for the Build definition. So your full MSBuild Arguments field will look something like this:

/t:Publish  /p:TargetProfile=Cloud /Property:PublishDir="//testserver/Deployment/BuildTemp/" /m:1

 Explanation of why it works
  In our solution we have several worker roles and web roles as part of the solution. With Azure SDK 2.0 and TFS Build all files including ServiceDefinition.csdef are copied to the single output directory. By default TFS Build includes /m flag which uses multiple threads (= number of cores) to build a solution. They can result in projects built in slightly different order and overwriting of the ServiceDefinition file, setting it to use a single thread resolve this issue.


Regards,
Nithin Rathnakar

Disclaimer: This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.


Free Windows Admin Tool Kit Click here and download it now
August 31st, 2015 5:01pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics