Trying to create my .cspkg Azure package file, but getting an error "Need to specify the physical directory for the virtual path..."

StackOverflow https://stackoverflow.com/questions/17553091

  •  02-06-2022
  •  | 
  •  

Question

When I try to package my Azure web app (to create the .cspkg and .cscfg files), I get the following error in my ServiceDefinition.csdef file:

Need to specify the physical directory for the virtual path 'AzurePOCWebRole/' of role AzurePOCWebRole

Here's my .csdef file:

enter image description here

I'm assuming the error is referring to my <Site name="AzurePOCWebRole"> piece. I try adding physicalDirectory to <Site name="AzurePOCWebRole" physicalDirectory="../AzurePOCWebRole">:

enter image description here

And try to create the package again, but I get the same error and it reverts that change I just made back to <Site name="AzurePOCWebRole">:

enter image description here

QUESTION: What can I do to resolve this error and create my package?

Was it helpful?

Solution

I was editing the "automatically generated" version of ServiceDefinition.csdef, which wasn't apparent because it didn't indicate it wasn't the actual file, so whenever I rebuilt, it reverted this file back to the original ServiceDefinition.csdef's file, which I WASN'T editing.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top