7

When I run MSBuild with the /t:Package parameter I want to be able to specify where the folder that contains the *.cmd and *.zip files gets output. Specifying _PackageTempDir outputs the entire application without the deploy files (*.cmd and *.zip). Is there any way to specify this in the command line?

UPDATE: The OutDir param outputs more than I need or want.

Hungry Beast
  • 3,677
  • 7
  • 49
  • 75

2 Answers2

9

I've found that setting /p:DesktopBuildPackageLocation=some\package.zip for MSBuild doesn't work (it works when specified in pubxml though).

However, it turns out that setting /p:PackageFileName=some\package.zip works fine. Furthermore, you can use it along with /p:PublishProfile parameter.

piotrwest
  • 2,098
  • 23
  • 35
4

If you set

<DesktopBuildPackageLocation>c:\foo\MyProject.zip</DesktopBuildPackageLocation>

you'll get the .zip file, the .cmd file, and the other related output files in c:\foo.

Jimmy
  • 27,142
  • 5
  • 87
  • 100
  • Where do you set DesktopBuildPackageLocation? – jcolebrand Jun 11 '12 at 19:11
  • @jcolebrand on the command line, with /p:DesktopBuildPackageLocation=your/path. In VS2010, in the project file with the XML snippet above. Just make sure it's under the right section for your configuration/platform. In VS2012, in the .pubxml file for your publish profile. – Jimmy Jun 12 '12 at 02:38
  • I followed some documentation but still not getting it worked out. Will try some more stuff tomorrow and update this answer if I remember once I know more about where I would like to see it set if I was asking in the future in the CSPROJ XML – jcolebrand Jun 12 '12 at 03:44