#1
|
|||
|
|||
VS.NET "Copy Project" command
I need to find out how to use the VS.NET "Copy Project" command at the end of my VBP build script.
Whenever I use VBP to build a new version of my .NET web applications, I have to leave a copy of VS.NET open, with the solution loaded (but not executing) in RELEASE mode. Then, at the end of the build, I click on the Project name in the Solution Explorer, and then select PROJECT -> COPY PROJECT to deploy the files to a specific location (always checking to ONLY copy the files needed to execute the application). Is there any way to do this automatically? It is ESSENTIAL that the copy step ONLY copies the files needed to run, not the code files, or unnecessary resource files. I've looked into the Object Model of the .NET Environment, and cannot find anything related to copying the project... does anyone out there know how to do it? |
#2
|
|||
|
|||
The first suggestion would be to use the MS-recommended method for robust/automated deployment - Web Setup projects [1, 2].
One other alternative would be to utilize the VBP Copy Files (if the server is on the same network) or FTP actions (if the server is only FTP-accessible) to copy the files. Otherwise, a couple possibilities for automating the VS.NET GUI would be 1) Try recording a macro in the IDE for the Copy Files dialog [3] to see if a programmable method to perform that is available, and invoke devenv from the build [4] to run the macro that calls the necessary methods 2) Call a tool such as AutoIt [5] or Macro Magic [6] from the build to control the VS.NET IDE and invoke the Copy Files dialog. [1] http://msdn.microsoft.com/library/en...Deployment.asp [2] http://www.15seconds.com/issue/030806.htm [3] http://msdn.microsoft.com/library/en...udioMacros.asp [4] http://msdn.microsoft.com/library/de...lrfcommand.asp [5] http://www.hiddensoft.com [6] http://www.snapfiles.com/get/macromagic.html |
#3
|
|||
|
|||
Copy Project does just that
The copy project command does just that, if you have a pretty basic project just do a recursive copy command from where your project builds it's files to where you want them to go and you have duplicated the Copy Project command in VS.Net. For more complicated projects it may do more than that, but I don't think so.
|
#4
|
|||
|
|||
Copy Project command
Can you explain that last posting a little further? I can't find any "CopyProject" command in VisualBuildPro, to set recursion on...
|
#5
|
|||
|
|||
Sorry. What I meant to say was that a recursive file copy (in Visual Build Pro) is nearly functionally identical to the Copy Project command in Visual Studio. If you use the copy files command in VBP to recursively copy the files using the following file masks:
*.dll *.as?x *.config *.css *.gif *.jpg You should pretty much replicate everything that the Copy Project command does when you say "copy only files needed for the site to run". |
|
|