Skip to content

Instantly share code, notes, and snippets.

@niaher
Last active April 2, 2019 08:16
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save niaher/71af64af003593f121d01b0c5a697160 to your computer and use it in GitHub Desktop.
Save niaher/71af64af003593f121d01b0c5a697160 to your computer and use it in GitHub Desktop.
MSDeploy script
msbuild "MyApp.Database/MyApp.Database.sqlproj" `
/t:"Build;Publish" `
/p:SqlPublishProfilePath="MyApp.Database.automated-tests.publish.xml" `
/p:UpdateDatabase=True `
/p:PublishScriptFileName="publish-script.sql"
msdeploy ^
-verb:sync ^
-source:package="MyApp.Web\outdir\_PublishedWebsites\MyApp.Web.csproj_Package\MyApp.Web.csproj.zip" ^
-dest:auto,computerName=https://myapp.scm.azurewebsites.net:443/msdeploy.axd?site=myapp,userName=$myapp,password=password,authtype=Basic,includeAcls=False ^
-disableLink:AppPoolExtension ^
-disableLink:ContentExtension ^
-disableLink:CertificateExtension ^
-setParam:name="IIS Web Application Name",value="myapp"
msdeploy `
-verb:sync `
-source:package=MyApp.Web\outdir\_PublishedWebsites\MyApp.Web.csproj_Package\MyApp.Web.csproj.zip `
-dest:'auto,computerName="https://myapp.scm.azurewebsites.net:443/msdeploy.axd?site=myapp",userName="$myapp",password="password",authtype="Basic",includeAcls="False"' `
-disableLink:AppPoolExtension `
-disableLink:ContentExtension `
-disableLink:CertificateExtension `
-setParam:name=`"IIS Web Application Name`",value="myapp"
Runner type: MSBuild
Build file path: MyApp.Web/MyApp.Web.csproj
MSBuild version: Microsoft Build Tools 2017
Command line parameters:
/p:Configuration="Debug"
/p:OutDir="outdir"
/t:package
".nuget/nuget.exe" restore MyApp.sln
<Project
ToolsVersion="15.0"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition="'$(Configuration)'==''">Debug</Configuration>
</PropertyGroup>
<Target Name="Build">
<Exec Command="msbuild.exe $(TestProject)\$(TestProject).csproj /verbosity:minimal" />
<Exec Command="vstest.console.exe $(TestProject)\bin\$(Configuration)\$(TestProject).dll /Logger:trx;LogFileName=$(TestProject).trx" />
</Target>
</Project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment