2
votes

I'm writing because we are facing technical issues when trying to publish or package a cloud service using the Azure SDK Tools 2.6 for Visual Studio 2013 Professional Edition, running on windows 7.

We are able to build the whole solution including the cloud service project on a regular build Ctrl + Shift + B, but when packaging or publishing the Cloud Service during the build process it fails. We have a few startup tasks within our ServiceDefinition file:

<Startup> 
<Task commandLine="Startup.cmd" executionContext="elevated" taskType="simple" />
 <Task commandLine="install.cmd" executionContext="elevated" taskType="simple">
        <Environment>
          <Variable name="PathToInstallLogs">
            <RoleInstanceValue xpath="/RoleEnvironment/CurrentInstance/LocalResources/LocalResource[@name='InstallLogs']/@path" />
          </Variable>
        </Environment>
      </Task>
</Startup>

This is the error we get: Access to path 'C:\Users\Irving\AppData\Local\Temp\qzt5xaiq.133\roles\RoleName\approot\bin\Startup.cmd' is denied. C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Windows Azure Tools\2.6\Microsoft.WindowsAzure.targets 3003 5 ProjectName

We've tried:

  • Running VS as administrator
  • Removing restrictions on the folder for read and write
  • Cleaning the solution
  • Doing a clean checkout
  • Restarting Visual Studio
  • Uninstalling the Azure SDK Tools and installing them again

Something we noticed is that our Senior and Software Architect have VS 2013 Ultimate edition and both are able to publish or package without a problem, but the rest of the team running VS Professional get the same error.

If we remove the startup tasks from the ServiceDefinition then it works like a charm, but somehow when including them in those computers running professional edition it fails.

Thanks in advance, we would highly appreciate any help.

Best Regards,

Irving Caminero

1

1 Answers

0
votes

Check your cloud service application that you are publishing. You probably have a Startup.cmd file in there as well.

This may be causing the issue.


Solution:

In your Azure project, rename the cmd file to something else like startup2.cmd

Then update your ServiceDefinition file:

<Startup> 
<Task commandLine="Startup2.cmd" executionContext="elevated" taskType="simple" />
 <Task commandLine="install.cmd" executionContext="elevated" taskType="simple">
        <Environment>
          <Variable name="PathToInstallLogs">
            <RoleInstanceValue xpath="/RoleEnvironment/CurrentInstance/LocalResources/LocalResource[@name='InstallLogs']/@path" />
          </Variable>
        </Environment>
      </Task>
</Startup>