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

隐身守侯 提交于 2019-12-12 18:54:57

问题


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:

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

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">:

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


回答1:


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.



来源:https://stackoverflow.com/questions/17553091/trying-to-create-my-cspkg-azure-package-file-but-getting-an-error-need-to-spe

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!