尝试创建我的.cspkg Azure软件包文件,但出现错误“需要为虚拟路径指定物理目录...". [英] Trying to create my .cspkg Azure package file, but getting an error "Need to specify the physical directory for the virtual path..."

查看:92
本文介绍了尝试创建我的.cspkg Azure软件包文件,但出现错误“需要为虚拟路径指定物理目录...".的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试打包Azure Web应用程序(以创建.cspkg和.cscfg文件)时,在ServiceDefinition.csdef文件中收到以下错误:

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:

需要为虚拟路径指定物理目录 角色AzurePOCWebRole的"AzurePOCWebRole/"

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

这是我的.csdef文件:

Here's my .csdef file:

我假设错误是指我的<Site name="AzurePOCWebRole">件.我尝试将physicalDirectory添加到<Site name="AzurePOCWebRole" physicalDirectory="../AzurePOCWebRole">:

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

并尝试再次创建该程序包,但出现相同的错误,它会将我刚才所做的更改恢复为<Site name="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?

推荐答案

我正在编辑ServiceDefinition.csdef的自动生成"版本,该版本不明显,因为它并未表明它不是实际文件,因此,每当我进行重建时,它都会将该文件还原为我不编辑的原始ServiceDefinition.csdef文件.

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.

这篇关于尝试创建我的.cspkg Azure软件包文件,但出现错误“需要为虚拟路径指定物理目录...".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆