Skip to content

Commit 6370f3d

Browse files
committed
NH-3962 - Build with MSBuild Tools 2017
1 parent 3251440 commit 6370f3d

File tree

6 files changed

+23
-10
lines changed

6 files changed

+23
-10
lines changed

Tools/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
nuget.exe
22
NUnit.*
3+
vswhere.*

Tools/msbuild.cmd

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
@echo off
2+
set pre=Microsoft.VisualStudio.Product.
3+
set ids=%pre%Community %pre%Professional %pre%Enterprise %pre%BuildTools
4+
5+
for /f "usebackq tokens=1* delims=: " %%i in (`%~dp0\vswhere.1.0.58\tools\vswhere.exe -latest -products %ids% -requires Microsoft.Component.MSBuild`) do (
6+
if /i "%%i"=="installationPath" set InstallDir=%%j
7+
)
8+
9+
if exist "%InstallDir%\MSBuild\15.0\Bin\MSBuild.exe" (
10+
"%InstallDir%\MSBuild\15.0\Bin\MSBuild.exe" %*
11+
) else (
12+
exit /b -1
13+
)

Tools/packages.config

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@
77
<package id="NUnit.Extension.NUnitV2ResultWriter" version="3.5.0" targetFramework="net461" />
88
<package id="NUnit.Extension.TeamCityEventListener" version="1.0.2" targetFramework="net461" />
99
<package id="NUnit.Extension.VSProjectLoader" version="3.5.0" targetFramework="net461" />
10-
</packages>
10+
<package id="vswhere" version="1.0.58" targetFramework="net461" />
11+
</packages>

build-common/common-project.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,7 @@
6464

6565
<target name="common.compile-all" depends="common.generate-assemblyinfo common.nuget-restore">
6666
<!--property name="msbuild.cmd" value="${cmd.sln} ${cmd.out} ${cmd.platform} ${cmd.debug} ${cmd.optimize} ${cmd.doc} /t:Rebuild /v:q /m" /-->
67-
<readregistry property="MSBuildToolsPath" key="SOFTWARE\Microsoft\MSBuild\ToolsVersions\14.0\MSBuildToolsPath" hive="LocalMachine" />
68-
69-
<exec program="${path::combine(MSBuildToolsPath, 'msbuild.exe')}" verbose="true">
67+
<exec program="${path::combine(tools.dir, 'msbuild.cmd')}" verbose="true">
7068
<arg value="${root.dir}/src/NHibernate.sln" />
7169
<arg value="/p:OutputPath=&quot;${path::get-full-path(bin.dir)}&quot;" />
7270
<arg value="/p:Platform=&quot;Any CPU&quot;" />

doc/documentation.build

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<property name="root.dir" value=".." />
1010
<include buildfile="${root.dir}/build-common/common-project.xml" />
1111

12-
<target name="init" depends="common.init">
12+
<target name="init" depends="common.init common.nuget-restore">
1313
<property name="doc.out.dir" value="${build.dir}/doc" />
1414
<property name="doc.help2.out.dir" value="${doc.out.dir}/help2" />
1515
<property name="doc.chm.out.dir" value="${doc.out.dir}" />
@@ -49,7 +49,7 @@
4949
</copy>
5050
</target>
5151

52-
<target name="api" depends="init apidocbuilder-project" description="Generates the API documentation (in MSDN style and VS.NET 2005 if available)">
52+
<target name="api" depends="init apidocbuilder-project" description="Generates the API documentation (in MSDN style if available)">
5353
<uptodate property="api.uptodate">
5454
<sourcefiles>
5555
<include name="${bin.dir}/*.dll" />
@@ -64,8 +64,7 @@
6464
<echo if="${api.uptodate}">API documentation is up to date, skipping generation step.</echo>
6565

6666
<if test="${not api.uptodate}">
67-
<property name="apidocbuilder.exe" value="${directory::get-parent-directory(environment::get-folder-path('System'))}\Microsoft.NET\Framework\v3.5\MSBuild.exe" />
68-
<exec program="${apidocbuilder.exe}">
67+
<exec program="${path::combine(tools.dir, 'msbuild.cmd')}">
6968
<arg line="NHibernate.shfbproj" />
7069
</exec>
7170
</if>

doc/reference/README.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@ You need a Java Runtime Environment (JRE) to run Saxon which is used to build
2121
the documentation. You don't need to download and install Saxon, its jars are
2222
present in the repository.
2323

24-
You need HTML Help Workshop to build the CHM help file, and Visual Studio
25-
Help Integration Kit (VSHIK) to build the HtmlHelp2 help file.
24+
You need HTML Help Workshop to build the CHM help file, and Sandcastle Help File
25+
Builder (SHFB - https://github.com/EWSoftware/SHFB) to build the HtmlHelp2 help
26+
file.
2627

2728
================================================================================
2829
DocBook Quick Start

0 commit comments

Comments
 (0)