Skip to content

Commit c9bf75a

Browse files
committed
Switching build to use VS2017 and VSWhere
1 parent a390281 commit c9bf75a

File tree

4 files changed

+40
-5
lines changed

4 files changed

+40
-5
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
#VS 2015 hidden folder
55
src/.vs/*
66

7+
build/tools/vswhere.2.0.2
8+
build/tools/vswhere.exe
9+
710
artifacts/*
811

912
# User-specific files

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
os: Visual Studio 2015
1+
os: Visual Studio 2017
22

33
# Version format
44
version: 0.5.10.{build}

build-appveyor.cmd

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,35 @@ ECHO APPVEYOR_REPO_TAG: %APPVEYOR_REPO_TAG%
33
ECHO APPVEYOR_BUILD_NUMBER : %APPVEYOR_BUILD_NUMBER%
44
ECHO APPVEYOR_BUILD_VERSION : %APPVEYOR_BUILD_VERSION%
55

6-
CALL build\tools\NuGet.exe restore src\UmbracoFileSystemProviders.Azure.sln
7-
CALL "%programfiles(x86)%\MSBuild\14.0\Bin\MsBuild.exe" build\package.proj
6+
CALL NuGet.exe restore src\UmbracoFileSystemProviders.Azure.sln
7+
8+
cd build
9+
10+
SET toolsFolder=%CD%\tools\
11+
IF NOT EXIST "%toolsFolder%" (
12+
MD tools
13+
)
14+
15+
IF NOT EXIST "%toolsFolder%vswhere.exe" (
16+
ECHO vswhere not found - fetching now
17+
nuget install vswhere -Version 2.0.2 -Source nuget.org -OutputDirectory tools
18+
)
19+
20+
FOR /f "delims=" %%A in ('dir "%toolsFolder%vswhere.*" /b') DO SET "vswhereExePath=%toolsFolder%%%A\"
21+
MOVE "%vswhereExePath%tools\vswhere.exe" "%toolsFolder%vswhere.exe"
22+
23+
for /f "usebackq tokens=1* delims=: " %%i in (`"%CD%\tools\vswhere.exe" -latest -requires Microsoft.Component.MSBuild`) do (
24+
if /i "%%i"=="installationPath" set InstallDir=%%j
25+
)
26+
27+
SET VSWherePath="%InstallDir%\MSBuild"
28+
29+
ECHO.
30+
ECHO Visual Studio is installed in: %InstallDir%
31+
32+
CALL "%InstallDir%\MSBuild\15.0\Bin\amd64\MsBuild.exe" package.proj %~1
33+
34+
@IF %ERRORLEVEL% NEQ 0 GOTO err
35+
@EXIT /B 0
36+
:err
37+
@EXIT /B 1

src/UmbracoFileSystemProviders.Azure.sln

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 14
4-
VisualStudioVersion = 14.0.25420.1
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.26430.16
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UmbracoFileSystemProviders.Azure", "UmbracoFileSystemProviders.Azure\UmbracoFileSystemProviders.Azure.csproj", "{749BC432-144A-4250-9066-D1FE170AFE42}"
77
EndProject
@@ -15,6 +15,8 @@ EndProject
1515
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "BuildPackage", "BuildPackage", "{DDE4D2E6-E526-4CB3-BECE-D89DFFB37B10}"
1616
ProjectSection(SolutionItems) = preProject
1717
..\appveyor.yml = ..\appveyor.yml
18+
..\build-appveyor.cmd = ..\build-appveyor.cmd
19+
..\build.cmd = ..\build.cmd
1820
..\build\transforms\FileSystemProviders.config.install.xdt = ..\build\transforms\FileSystemProviders.config.install.xdt
1921
..\build\transforms\FileSystemProviders.config.uninstall.xdt = ..\build\transforms\FileSystemProviders.config.uninstall.xdt
2022
..\build\transforms\imageprocessor.web.config.install.xdt = ..\build\transforms\imageprocessor.web.config.install.xdt

0 commit comments

Comments
 (0)