Filter files for deployment

bungpeng

Well-known member
Joined
Sep 10, 2002
Messages
906
Location
Malaysia
To deploy ASP.NET to server,
We just need to move the "aspx" and "dll", but not ".vb" (in vb.net).
Is there anyway I can filter those ".vb" file so easy for my deployment or version updating process?
 
bungpeng said:
To deploy ASP.NET to server,
We just need to move the "aspx" and "dll", but not ".vb" (in vb.net).
Is there anyway I can filter those ".vb" file so easy for my deployment or version updating process?


How to deploy a Visual Basic or C# (csharp) web site:
With only the "needed" files for deployment.


Create a .bat file. Put this bat file where you .sln (visual basic for C# solution) file exists.

<<mybat.bat>>

del BuildDefaultResultsRelease.txt
"C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE\devenv.exe" MYSOLUTION.sln /rebuild Release /out BuildDefaultResultsRelease.txt

xcopy *.* c:\wutemp\mytempdirectory\*.* /E /R /EXCLUDE:.\XCopyExcludes.txt

<</mybat.bat>>

Ok. Now you create a new txt file called XCopyExcludes.txt
Also place it in the directory with the solution file.

<< XCopyExcludes.txt>>

.vbproj
.scc
.resx
.vb
.snk
.pdb
.xsx
.xsd
.sln
.vssscc
.bat
XCopyExcludes.txt
BuildDefaultResultsRelease.txt

<</ XCopyExcludes.txt>>



Make sure the directory
c:\wutemp\mytempdirectory\
already exists.


Naturally, make sure the value
C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE\devenv.exe
is legitimate for your local setup. The above is the default location.



Run the .bat file. Check the c:\wutemp\mytempdirectory\ directory.
 
The better to do that... is via "Copy Project".

Go into the main menu :

Project/Copy Project...

And there... youll have to fill the correct information ... and... look at the bottom of the window... theres 3 options related to Copy and the first one is : "Only files needed to run this application" and everything will be set up correctly.

Ive used this on my side. It throw me some error (dont have admin access and cant configure IIS on the Distant server so...) but hes able to copy the file. That way... if you have a admin right on the server... everything will be "nearly" installed and ready to run.

Have some fun !
 
Back
Top