Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,9 +329,16 @@ def _install_packages(self):
self.debug_print("Updating NuGet: {0}".format(cmd))
subprocess.check_call(cmd, shell=use_shell)

cmd = "{0} restore pythonnet.sln -MSBuildVersion 14 -o packages".format(nuget)
self.debug_print("Installing packages: {0}".format(cmd))
subprocess.check_call(cmd, shell=use_shell)
try:
# msbuild=14 is mainly for Mono issues
cmd = "{0} restore pythonnet.sln -MSBuildVersion 14 -o packages".format(nuget)
self.debug_print("Installing packages: {0}".format(cmd))
subprocess.check_call(cmd, shell=use_shell)
except:
# when only VS 2017 is installed do not specify msbuild version
cmd = "{0} restore pythonnet.sln -o packages".format(nuget)
self.debug_print("Installing packages: {0}".format(cmd))
subprocess.check_call(cmd, shell=use_shell)

def _find_msbuild_tool(self, tool="msbuild.exe", use_windows_sdk=False):
"""Return full path to one of the Microsoft build tools"""
Expand Down