3

I have upgraded to azure 1.7 and now my build process is broken. I have a script that runs after the build which simply fires cspack as follows.

cspack "C:\Users\MyAppBuild\.hudson\jobs\MyApp Portal Build\workspace\trunk\Portal\SMEEDI.Cloud\ServiceDefinition.csdef"   
/role:MyApp.Portal;"C:\Users\MyAppBuild\.hudson\jobs\MyApp Portal Build\workspace\trunk\Portal\Portal\MyApp.Portal\bin"   
/sites:"C:\Users\MyAppBuild\.hudson\jobs\MyApp Portal Build\workspace\trunk\Portal\Portal\MyApp.Portal\bin";"MyApp.Portal"   
/out:"C:\Users\MyAppBuild\.hudson\jobs\MyApp Portal Build\MyApp.Cloud.cspkg

This is my service definition:

<?xml version="1.0" encoding="utf-8"?>
<ServiceDefinition name="MyApp.Cloud" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition" schemaVersion="2012-05.1.7">
<WebRole name="MyApp.Portal" enableNativeCodeExecution="true">
<ConfigurationSettings>
  <Setting name="DiagnosticsConnectionString" />
  <Setting name="DataConnectionString" />
  <Setting name="BaseUrl" />
  <Setting name="DatabaseConnectionString" />
  <Setting name="Environment" />
</ConfigurationSettings>
<Sites>
  <Site name="MyApp_WebRole" physicalDirectory="..\Portal\MyApp.Portal">
    <Bindings>
      <Binding name="HttpIn" endpointName="HttpIn" />
    </Bindings>
  </Site>
</Sites>
<Endpoints>
  <InputEndpoint name="HttpIn" protocol="http" port="80" />
</Endpoints>
<Imports>
  <Import moduleName="RemoteAccess" />
  <Import moduleName="RemoteForwarder" />
</Imports>

I get the error :

Error: CloudServices7 : The physical directories are not valid for role /sites:C
:\Users\MyAppBuild\.hudson\jobs\MyApp Portal Build\workspace\trunk\Portal\Port
al\MyApp.Portal\bin;MyApp.Portal sites, virtual directories, and virtual appli
cations..

What should the physical directory be?

Toby Holland
  • 1,029
  • 2
  • 14
  • 29
  • My understanding is that the path is relative to the cloud project, so you should have a directory in the folder above the Cloud Project called Portal, and in that the folder with your web app in (MyApp.Portal). – Richard Astbury Sep 26 '12 at 13:25
  • Did you manage to fix this problem? I'm stuck with the same error. – Marcom Feb 18 '13 at 15:39

1 Answers1

0

You may need to use relative path rather than absolute path. Please refer here

When upgrading a project that has relative paths in the csdef (as is the case here) to the 1.8 SDK you should see the warning below in the upgrade log about the change in relative path. This specific change was made to better support parallel builds.

The physicalDirectory attribute of the Site element contains a relative path. This path is relative to the directory in which the target Service Definition file resides when packaged. In previous versions this file was located within the root project directory. In this version, by default, this file is located in the project output directory. You may need to update the relative path to reflect the new location of the target Service Definition file.

Community
  • 1
  • 1
zentby
  • 314
  • 3
  • 8