Web.Configs

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
captedgar
Posts: 7
Joined: 22 Oct 2009 18:13

Web.Configs

#1 Post by captedgar » 09 Aug 2010 03:49

Hi there
I'm using a batch file to publish .NET builds onto a release server
which is then dished out to all servers.
i have the following line of code in my deployment.bat file

Code: Select all

rem Publish Site to temp folder 
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\MSBuild.exe Buildscripts
\Software Project1.Publish.proj /property:OutputFolder=%tempfolder%
\Software Project1\ /property:WebProjectOutputDir=%tempfolder%
\Software Project1\bin


XCOPY /EXCLUDE:"%tempfolder%\Software Project1\Web.config"


The first line of code publishes all the asset files which are in the
root of Software Project 1 directory. Of this one of the files is the
web.config file.
I'm trying to exclude this webconfig with the 2nd line of code and i'm
not having much luck though. I don't want to exclude the web.config in
the Software Project1.sln because this will affect development
environment as these files are managed source controller.


please advice me

aGerman
Expert
Posts: 4678
Joined: 22 Jan 2010 18:01
Location: Germany

Re: Web.Configs

#2 Post by aGerman » 09 Aug 2010 11:17

Did you try:

Code: Select all

XCOPY YourSource YourDestination /EXCLUDE:Web.config

You have to define the source and the destination for xcopy.
Type XCOPY /? to the command prompt to find the other options you probably will need.

Regards
aGerman

Post Reply