File tree 1 file changed +10
-3
lines changed
1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -329,9 +329,16 @@ def _install_packages(self):
329
329
self .debug_print ("Updating NuGet: {0}" .format (cmd ))
330
330
subprocess .check_call (cmd , shell = use_shell )
331
331
332
- cmd = "{0} restore pythonnet.sln -MSBuildVersion 14 -o packages" .format (nuget )
333
- self .debug_print ("Installing packages: {0}" .format (cmd ))
334
- subprocess .check_call (cmd , shell = use_shell )
332
+ try :
333
+ # msbuild=14 is mainly for Mono issues
334
+ cmd = "{0} restore pythonnet.sln -MSBuildVersion 14 -o packages" .format (nuget )
335
+ self .debug_print ("Installing packages: {0}" .format (cmd ))
336
+ subprocess .check_call (cmd , shell = use_shell )
337
+ except :
338
+ # when only VS 2017 is installed do not specify msbuild version
339
+ cmd = "{0} restore pythonnet.sln -o packages" .format (nuget )
340
+ self .debug_print ("Installing packages: {0}" .format (cmd ))
341
+ subprocess .check_call (cmd , shell = use_shell )
335
342
336
343
def _find_msbuild_tool (self , tool = "msbuild.exe" , use_windows_sdk = False ):
337
344
"""Return full path to one of the Microsoft build tools"""
You can’t perform that action at this time.
0 commit comments