I have a classic Cloud Services project that has multiple websites on a single service, configured in ServiceDefinition.csdef
like so:
<WebRole name="PE.Roles.API" vmsize="Small">
<Sites>
<Site name="API" physicalDirectory="..\..\..\PE.Roles.API">
<Bindings>
<Binding name="http" endpointName="PE.API" />
</Bindings>
</Site>
<Site name="PE.Services.Authorization" physicalDirectory="..\..\..\PE.Services.Authorization">
<Bindings>
<Binding name="http" endpointName="PE.Services.Authorization" />
</Bindings>
</Site>
<!-- Etc -->
</Sites>
</WebRole>
This compiles and packages correctly in Visual Studio 2015, and deploys without a problem from a precompiled .cspkg
file to the Cloud Service.
We have recently moved to Visual Studio Team Services for DevOps, and I'm trying to set this solution up to build and deploy in the cloud, using the provided Azure Cloud Services build template.
The .sln
build step completes correctly, but the .ccproj
build step fails with the following error:
PE.Azure\bin\ServiceDefinition.csdef (0, 0)
PE.Azure\bin\ServiceDefinition.csdef(0,0): Error CloudServices079: Cannot find the physical directory 'D:\a\1\PE.Roles.API' for virtual path API/.
Process 'msbuild.exe' exited with code '1'.
My build arguments are: /t:Publish /p:TargetProfile=$(targetProfile) /p:DebugType=None /p:SkipInvalidConfigurations=true /p:OutputPath=bin\ /p:PublishDir="$(build.artifactstagingdirectory)\\"
I've found a number of blog posts and SO questions covering similar issues, but nothing that addresses this precisely (and nothing posted in the last few years).
Update
I've created a TFVC repo for the project and implemented the mapping step, as suggested below:
...but I still get the same error:
What do I need to do to get this working?