Using msbuild to execute a File System Publish Profile

后端 未结 7 1757
萌比男神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:37

    It looks to me like your publish profile is not being used, and doing some default packaging. The Microsoft Web Publish targets do all what you are doing above, it selects the correct targets based on the config.

    I got mine to work no problem from TeamCity MSBuild step, but I did specify an explicit path to the profile, you just have to call it by name with no .pubxml (e.g. FileSystemDebug). It will be found so long as in the standard folder, which yours is.

    Example:

    C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe ./ProjectRoot/MyProject.csproj /p:DeployOnBuild=true /p:PublishProfile=FileSystemDebug

    Note this was done using the Visual Studio 2012 versions of the Microsoft Web Publish targets, normally located at "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web". Check out the deploy folder for the specific deployment types targets that are used

提交回复
热议问题