Hy guys
I'm writing script for CI system (Bamboo). So, it calls "msbuild.exe project.sln /p:Configuration=Release". In csproj file of mvc web application i defined after-build task in different ways.
None of these do publish:
<AspNetCompiler
VirtualPath="temp"
ToolPath="C:\Windows\Microsoft.NET\Framework\v4.0.30319"
PhysicalPath="$(ProjectDir)"
TargetPath="d:\inetpub\mvc"
Clean="true"
Force="true"
Debug="false" />
publishes not only necessary files. "published" site inlcudes .cs, csproj files and even excluded files/
<MSBuild Projects="project.sln" Properties="Configuration=Release;WebProjectOutputDir=d:\inetpub\mvc\;OutDir=d:\inetpub\mvc\bin\" />
does nothing (actually it builds project again ignoring stated folders in props.
But when my script file contains:
msbuild.exe project.sln /p:Configuration=Release msbuild.exe project.sln /p:Configuration=Release /p:WebProjectOutputDir=d:\inetpub\mvc\ /p:OutDir=d:\inetpub\mvc\bin\
And after-build task is empty - IT WORKS!!! It publishes only necessary files. How can it be (MSDN says about "identity" of msbuild.exe and msbuild task) and - how can I use msbuild task to publish my projects properly?
Thanx a lot :)