我使用 Azure SDK 2.5 我在云服务项目中有一个 Web 角色。我想以某种方式添加一个文件夹,以便将其部署在 approot 的父目录中。我还没有找到一种方法来做到这一点,这让我想知道在 csdef 中定义虚拟目录的能力有什么用。
所以我想我会尝试通过csdef中的Contents/Content xml配置添加文件夹。我要么从根本上误解了这部分配置的作用,要么完全被破坏了。
假设这个文件夹结构
/
/CloudService
/SomeOtherContent
如果我定义以下内容:
<Contents>
<Content destination="frontend">
<SourceDirectory path="..\SomeOtherContent" />
</Content>
</Contents>
并构建我得到:
错误 CloudServices089:找不到源目录 'C:\src\template\src\Template.CloudService\bin\Debug\..\SomeOtherContent'
好的,所以它启动了 bin\Debug,所以我就让它 ..\..\..\SomeOtherContent
错误 CloudServices089:找不到源目录 'C:\src\template\src\Template.CloudService\..\..\..\SomeOtherContent'
是的,没错,我的相对路径解析的文件夹已经改变了!!!它不再是 bin\Debug。哇!?如何使它起作用?如果我输入一个完整的驱动器限定的绝对路径,它就可以工作。