VS2013 Publish - FileSystem output as zip

1.5k Views Asked by At

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

1

There are 1 best solutions below

2
On

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>