Created
February 16, 2017 19:41
-
-
Save phillijw/bf86354a3154ce7f98e740200f872323 to your computer and use it in GitHub Desktop.
An example of how you might write a simple build script with msbuild compatible with C# 6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
"C:\Program Files (x86)\MSBuild\14.0\Bin\msbuild.exe" ../MEDIC.Web.csproj /t:rebuild;package /p:Configuration=Release /p:EnvConfig="Production" | |
if errorlevel 1 goto errorDone | |
echo Build successful | |
robocopy ../bin/ ../obj/Release/Package/PackageTmp/ Web.config | |
echo Copied transformed Web.config | |
robocopy ../obj/Release/Package/PackageTmp/ \\web2a\C$\inetpub\medic.mywebsite.com * | |
robocopy ../obj/Release/Package/PackageTmp/ \\web2b\C$\inetpub\medic.mywebsite.com * | |
echo Copied files successfully | |
goto success | |
:errorDone | |
color 02 | |
echo Build failed. Not copying files | |
:success |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment