Skip to content

Commit cb66f77

Browse files
committed
Upgrade to VS 2017 & MSBuild 15
1 parent 99a30f7 commit cb66f77

File tree

3 files changed

+42
-3
lines changed

3 files changed

+42
-3
lines changed

Elmah.SqlServer.sln

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
Microsoft Visual Studio Solution File, Format Version 12.00
2-
# Visual Studio 14
3-
VisualStudioVersion = 14.0.25420.1
2+
# Visual Studio 15
3+
VisualStudioVersion = 15.0.27004.2002
44
MinimumVisualStudioVersion = 10.0.40219.1
55
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{B44EF77F-33EB-40B9-BF2A-83E6B5CE7EAF}"
66
ProjectSection(SolutionItems) = preProject
77
build.cmd = build.cmd
88
COPYING.txt = COPYING.txt
99
Elmah.SqlServer.nuspec = Elmah.SqlServer.nuspec
10+
msbuild.cmd = msbuild.cmd
1011
pack.cmd = pack.cmd
1112
README.md = README.md
1213
EndProjectSection
@@ -39,4 +40,7 @@ Global
3940
GlobalSection(SolutionProperties) = preSolution
4041
HideSolutionNode = FALSE
4142
EndGlobalSection
43+
GlobalSection(ExtensibilityGlobals) = postSolution
44+
SolutionGuid = {A606CD26-3A2D-4A4C-AE99-D16870F023D2}
45+
EndGlobalSection
4246
EndGlobal

build.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ goto :EOF
77
:main
88
setlocal
99
nuget restore ^
10-
&& (for %%v in (3.5 4.0 4.5) do for %%c in (Debug Release) do MSBuild "/p:Configuration=NETFX %%v %%c" /v:m %* || exit /b 1)
10+
&& (for %%v in (3.5 4.0 4.5) do for %%c in (Debug Release) do call msbuild "/p:Configuration=NETFX %%v %%c" /v:m %* || exit /b 1)
1111
goto :EOF

msbuild.cmd

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
@echo off
2+
setlocal
3+
if "%PROCESSOR_ARCHITECTURE%"=="x86" set PROGRAMS=%ProgramFiles%
4+
if defined ProgramFiles(x86) set PROGRAMS=%ProgramFiles(x86)%
5+
for %%e in (Community Professional Enterprise) do (
6+
if exist "%PROGRAMS%\Microsoft Visual Studio\2017\%%e\MSBuild\15.0\Bin\MSBuild.exe" (
7+
set "MSBUILD=%PROGRAMS%\Microsoft Visual Studio\2017\%%e\MSBuild\15.0\Bin\MSBuild.exe"
8+
)
9+
)
10+
if exist "%MSBUILD%" goto :build
11+
set MSBUILD=
12+
for %%i in (MSBuild.exe) do set MSBUILD=%%~dpnx$PATH:i
13+
if not defined MSBUILD goto :nomsbuild
14+
set MSBUILD_VERSION_MAJOR=
15+
set MSBUILD_VERSION_MINOR=
16+
for /f "delims=. tokens=1,2,3,4" %%m in ('msbuild /version /nologo') do (
17+
set MSBUILD_VERSION_MAJOR=%%m
18+
set MSBUILD_VERSION_MINOR=%%n
19+
)
20+
if not defined MSBUILD_VERSION_MAJOR goto :nomsbuild
21+
if not defined MSBUILD_VERSION_MINOR goto :nomsbuild
22+
if %MSBUILD_VERSION_MAJOR% lss 15 goto :nomsbuild
23+
if %MSBUILD_VERSION_MINOR% lss 1 goto :nomsbuild
24+
:build
25+
"%MSBUILD%" %*
26+
goto :EOF
27+
28+
:nomsbuild
29+
echo>&2 Microsoft Build Engine 15.1 is required to build the solution. For
30+
echo>&2 installation instructions, see:
31+
echo>&2 https://docs.microsoft.com/en-us/visualstudio/install/use-command-line-parameters-to-install-visual-studio
32+
echo>&2 At the very least, you will want to install the MSBuilt Tool workload
33+
echo>&2 that has the identifier "Microsoft.VisualStudio.Workload.MSBuildTools":
34+
echo>&2 https://docs.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-build-tools#msbuild-tools
35+
exit /b s

0 commit comments

Comments
 (0)