Skip to content

Commit fcd3b52

Browse files
authored
Use msbuild from environment (#977)
windows-2016 is deprecated, the build is failing when running on windows-2019
1 parent f352a74 commit fcd3b52

File tree

3 files changed

+12
-14
lines changed

3 files changed

+12
-14
lines changed

.github/workflows/test-win-latest.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,25 @@ on:
2121

2222
jobs:
2323
test:
24-
name: Test on Windows ${{ matrix.arch }}-${{ matrix.config }}
24+
name: Test on Windows ${{ matrix.arch }}-${{ matrix.build }}
2525
runs-on: ${{ matrix.os }}
2626
strategy:
2727
matrix:
2828
arch: [Win32, x64]
29-
config: [Release, Debug]
30-
os: [windows-2016]
29+
build: [Release, Debug]
30+
os: [windows-2019]
3131

3232
steps:
3333

3434
- name: Checkout
3535
uses: actions/checkout@v1
3636
continue-on-error: true
3737

38-
- name: Test ${{ matrix.arch }} ${{ matrix.config }}
38+
- name: setup-msbuild
39+
uses: microsoft/[email protected]
40+
with:
41+
vs-version: '[16,)'
42+
43+
- name: Test ${{ matrix.arch }} ${{ matrix.build }}
3944
shell: cmd
40-
run: build-tests.cmd ${{ matrix.arch }} ${{ matrix.config }}
45+
run: build-tests.cmd ${{ matrix.arch }} ${{ matrix.build }}

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ Other resources to learn how to setup the build system:
7171
| Windows 8.1 | :white_check_mark: | |
7272
| Windows 10.x | :white_check_mark: | |
7373
| Windows Server 2012 | :white_check_mark: | |
74-
| Windows Server 2016 | :white_check_mark: | :white_check_mark: |
75-
| Windows Server 2019 | :white_check_mark: | |
74+
| Windows Server 2016 | :white_check_mark: | |
75+
| Windows Server 2019 | :white_check_mark: | :white_check_mark: |
7676

7777
* **Supported** - these platforms are known to work well with the SDK in
7878
production.

build-tests.cmd

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,6 @@ echo Using custom properties file for the build:
2222
echo %CUSTOM_PROPS%
2323
:skip
2424

25-
REM Add path to vs2017 MSBuild.exe
26-
set "PATH=%PATH%;C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\"
27-
28-
REM Try to setup vs2017 Dev environment if possible
29-
echo Building using Visual Studio 2017 tools
30-
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\VsDevCmd.bat"
31-
3225
set MAXCPUCOUNT=%NUMBER_OF_PROCESSORS%
3326
set SOLUTION=Solutions\MSTelemetrySDK.sln
3427

0 commit comments

Comments
 (0)