简体   繁体   English

创建Azure包时包含/排除文件

[英]Include/Exclude files when creating Azure package

I am creating an azure package using Visual Studio (right click on azure project -> package). 我正在使用Visual Studio创建一个azure包(右键单击azure项目 - >包)。 I would like to include and exclude some files in the package similar to this: How do you include additional files using VS2010 web deployment packages? 我想在包中包含和排除一些类似于这样的文件如何使用VS2010 Web部署包包含其他文件? What do I need to do to get this working for the azure package function? 我需要做些什么才能使这个功能适用于azure包功能?

Windows Azure deployment package (CSPKG) file is different then regular VS publish package even though CSPKG file is actually a zip file. Windows Azure部署包(CSPKG)文件与常规VS发布包不同,即使CSPKG文件实际上是zip文件。 You can rename CSPKG to zip and see what is inside however you can not add or delete files this way as your package will be corrupt. 您可以将CSPKG重命名为zip并查看其中的内容但是您无法以这种方式添加或删除文件,因为您的程序包将损坏。

The best way to add files to your CSPKG is to add those files in your VS project and then in those file properties set "copy local as true" means add these files to final output. 向CSPKG添加文件的最佳方法是在VS项目中添加这些文件,然后在那些文件属性集中“copy local as true”表示将这些文件添加到最终输出。 This way when you build the CSPKG the files will be there. 这样,当您构建CSPKG时,文件将存在。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM