-
Notifications
You must be signed in to change notification settings - Fork 6
/
PublishSolution.cmd
74 lines (54 loc) · 3.09 KB
/
PublishSolution.cmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
dotnet restore tools\NuGet\NuGet.csproj
if errorlevel 1 GOTO ERROR
%userprofile%\.nuget\packages\nuget.commandline\4.1.0\tools\nuget.exe restore
REM Build
msbuild AspNetPublishSamples.sln
if errorlevel 1 GOTO ERROR
REM File System Publish (Used by Kudu)
REM Syntax:
:: msbuild solutionName.sln
:: /p:PublishUrl="<destination path>"
:: /p:DeployOnBuild=true
:: /p:Configuration=Release
:: /p:WebPublishMethod=FileSystem
:: /p:DeployTarget=WebPublish
:: /p:AutoParameterizationWebConfigConnectionStrings=false
:: /p:SolutionDir="."
:: Only for WebJobs on DotNet Core Project System
:: /p:IsWebJobProject=true
:: /p:WebJobName=<WebJobName>
:: /p:WebJobType==<Continuous|Triggered>
:: =========== Solution ===============
msbuild ASPNetPublishSamples.sln /p:PublishUrl="bin\Release\PublishOutput" /p:DeployOnBuild=true /p:Configuration=Release /p:WebPublishMethod=FileSystem /p:DeployTarget=WebPublish /p:AutoParameterizationWebConfigConnectionStrings=false /p:SolutionDir="."
if errorlevel 1 GOTO ERROR
:: =========== WebSite ===============
REM ASP.NET Razor 3 Web Site.
msbuild AspNetRazor3WebSite\website.publishproj /p:PublishUrl="bin\Release\PublishOutput" /p:DeployOnBuild=true /p:Configuration=Release /p:WebPublishMethod=FileSystem /p:DeployTarget=WebPublish /p:AutoParameterizationWebConfigConnectionStrings=false /p:SolutionDir="."
if errorlevel 1 GOTO ERROR
REM MSDeploy Package Publish(Used by TeamBuild)
REM Syntax:
:: msbuild SolutionName.sln
:: /p:PackageLocation="<destination path>"
:: /p:DeployOnBuild=true
:: /p:Configuration=Release
:: /p:WebPublishMethod=Package
:: /p:DeployTarget=WebPublish
:: /p:PackageAsSingleFile=true
:: /p:AutoParameterizationWebConfigConnectionStrings=false
:: /p:SolutionDir="."
:: /p:DesktopBuildPackageLocation=<destination file with extension> (Only needed for ASP.NET Core projects using cli < 2.0. This is due to a bug which has been fixed in 2.0 cli)
:: /p:DeployIisAppPath=<Web site name> (Only needed for ASP.NET Core projects using cli < 2.0. This is due to a bug which has been fixed in 2.0 cli)
:: Only for WebJobs on DotNet Core Project System
:: /p:IsWebJobProject=true
:: /p:WebJobName=<WebJobName>
:: /p:WebJobType==<Continuous|Triggered>
:: =========== Solution ===============
msbuild ASPNetPublishSamples.sln /p:PackageLocation="bin\Release\PublishOutputZip" /p:DeployOnBuild=true /p:Configuration=Release /p:WebPublishMethod=Package /p:DeployTarget=WebPublish /p:AutoParameterizationWebConfigConnectionStrings=false /p:PackageAsSingleFile=true /p:DeployIisAppPath="Default Web Site" /p:SolutionDir="." /p:DesktopBuildPackageLocation="PublishOutputZip\MsDeployPackage.zip"
if errorlevel 1 GOTO ERROR
:: =========== WebSite ===============
REM ASP.NET Razor 3 Web Site.
msbuild AspNetRazor3WebSite\website.publishproj /p:PackageLocation="bin\Release\PublishOutputZip" /p:DeployOnBuild=true /p:Configuration=Release /p:WebPublishMethod=Package /p:DeployTarget=WebPublish /p:AutoParameterizationWebConfigConnectionStrings=false /p:PackageAsSingleFile=true /p:DeployIisAppPath="Default Web Site" /p:SolutionDir="."
if errorlevel 1 GOTO ERROR
:ERROR
endlocal
exit /b 1