Possible Duplicate:
Replicate VS2008 “Publish Web Site” from command line
I am trying to set up a continuous integration server using CCNet and have currently come so far that I'm able to automatically build the project and everything works fine.
The next thing I want to implement is to automatically publish the website after each build. I want to do the exact same thing that is being done in Visual Studio when you right click on the project and press "Publish" and publish to the file system
In order to do this and be sure that the command really is what Visual Studio does I was thinking that one way could be to try and record which command Visual Studio uses. Is this possible? Or is there some other way to know which command it uses?
I know that there are questions about this already but I want to do the exact same command as Visual Studio. Something that I haven't found in any other question. Even though the answers to questions similar to this one are very close to the result I need, the problem is that the files are slightly different. See these two screenshots.
The files when using "Publish" from Visual Studio (Desired result): https://i.stack.imgur.com/xZo27.png
The files when using MSBuild "projectPath" /p:Configuration=Release;WebProjectOutputDir=C:\ConsolePublish\;OutDir=C:\ConsolePublish\bin\ /target:ResolveReferences;_CopyWebApplication: https://i.stack.imgur.com/WC8GA.png
The command used for the second screenshot is one of the answers given to other posters who want to achieve the same result as me.
As you can see from the screenshots the result is slightly different from the result you get when using "Publish" in Visual Studio (The first screenshot). I have tried many other commands as well but all of them seem to differ in some way from the result produced by publish in Visual Studio.
The reason that I want to duplicate the exact behavior of Visual Studio is because then there would never be any difference when publishing from Visual Studio or from the continuous integration server. Meaning that there would never arise a bug from publishing in one of the two ways but not in the other one.
So my question is this: Can the exact behavior of publish in Visual Studio be duplicated, using for instance MSBuild or similar commands? Is it possible to record what command Visual Studio uses when performing "Publish" so that it is verifiable that I'm doing the exact same command?
I really don't want to settle for two different versions of the web application. If there is some information that you think is relevant that I have left out please ask me.
Thanks in advance!
/Linus
PS: Sorry that I have to include links to the screenshots but I don't have enough reputation to post with real screenshots.