Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.

Commit 467d661

Browse files
[azdo] add job using MSBuild from VS (#18)
This verifies we can build with .NET Framework MSBuild from Visual Studio. This would only work in VS 2019 16.10 and higher.
1 parent 0d302c9 commit 467d661

File tree

3 files changed

+42
-11
lines changed

3 files changed

+42
-11
lines changed

azure-pipelines.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,43 @@ jobs:
7070
pathToPublish: bin/Release
7171
condition: succeededOrFailed()
7272

73+
# Builds with MSBuild from VS
74+
- job: vs
75+
pool:
76+
vmImage: windows-latest
77+
demands: msbuild
78+
steps:
79+
- powershell: |
80+
$ProgressPreference = 'SilentlyContinue'
81+
Invoke-WebRequest -Uri "https://dot.net/v1/dotnet-install.ps1" -OutFile dotnet-install.ps1
82+
& .\dotnet-install.ps1 -Version $(DotNetVersion) -InstallDir "$env:ProgramFiles\dotnet\" -Verbose
83+
& dotnet --list-sdks
84+
displayName: install .NET $(DotNetVersion)
85+
- powershell: |
86+
& dotnet tool update --global boots --version $(BootsVersion)
87+
& boots $(Android.Msi)
88+
& boots $(iOS.Msi)
89+
displayName: install .NET workloads
90+
- powershell: |
91+
& boots --stable Xamarin.Android
92+
displayName: install Xamarin.Android
93+
- task: MSBuild@1
94+
inputs:
95+
solution: Xamarin.Legacy.Sdk.sln
96+
msbuildArguments: -restore -bl:$(System.DefaultWorkingDirectory)/bin/Xamarin.Legacy.Sdk.binlog
97+
displayName: build SDK
98+
- task: MSBuild@1
99+
inputs:
100+
solution: samples/samples.sln
101+
msbuildArguments: -restore -bl:$(System.DefaultWorkingDirectory)/bin/samples.binlog
102+
displayName: build samples
103+
- task: PublishPipelineArtifact@1
104+
displayName: artifacts
105+
inputs:
106+
artifact: vs
107+
targetPath: bin
108+
condition: succeededOrFailed()
109+
73110
- job: mac
74111
pool:
75112
vmImage: macOS-latest

global.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
{
2+
"sdk": {
3+
"allowPrerelease": true
4+
},
25
"msbuild-sdks": {
3-
"Microsoft.Build.NoTargets": "2.0.1"
6+
"Microsoft.Build.NoTargets": "2.0.1",
7+
"Xamarin.Legacy.Sdk": "0.1.0-alpha2"
48
}
59
}

samples/global.json

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)