Using msbuild to execute a File System Publish Profile

后端 未结 7 1819
萌比男神i
萌比男神i 2020-11-28 06:09

I have a c# .Net 4.0 project created with VS2010 and now being accessed with VS2012.

I\'m trying to publish only the needed files from this website to a destination

7条回答
  •  误落风尘
    2020-11-28 06:24

    Actually I merged all your answers to my own solution how to solve the above problem:

    1. I create the pubxml file according my needs
    2. Then I copy all the parameters from pubxml file to my own list of parameters "/p:foo=bar" for msbuild.exe
    3. I throw away the pubxml file

    The result is like that:

    msbuild /t:restore /t:build /p:WebPublishMethod=FileSystem /p:publishUrl=C:\builds\MyProject\ /p:DeleteExistingFiles=True /p:LastUsedPlatform="Any CPU" /p:Configuration=Release

提交回复
热议问题