简体   繁体   中英

VS2013 Publish - FileSystem output as zip

Is there anyway to use VS2013 Publish profiles, <WebPublishMethod>FileSystem</WebPublishMethod>

and output a zip file of the finished publish?

I'm not looking for the Web Deploy Package, I'm looking for the File System mode, but zipping the published files

You can get it to do this, and it's in the UI, although I can't actually manage to work out how I did it to do it again! The * help is all VS 2012 and generally is less than useful.

Looking inside the .pubxml file gives a clue though (I edited this to protect the guilty). As below, PackageAsSingleFile is what you need. You can make that work from the UI, which is how I got this, but now I can't find that bit of UI, but you could maybe put this XML in your file and try that...

<Project ToolsVersion="4.0" ...>
  <PropertyGroup>
    <WebPublishMethod>Package</WebPublishMethod>
...
    <ExcludeApp_Data>True</ExcludeApp_Data>
    <DesktopBuildPackageLocation>M:\OUTPUT.zip</DesktopBuildPackageLocation>
    <PackageAsSingleFile>true</PackageAsSingleFile>
    <DeployIisAppPath>Demonstration site</DeployIisAppPath>
  </PropertyGroup>
</Project>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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