File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -53,8 +53,19 @@ echo Project files generated.
53
53
@ rem Skip project generation if requested.
54
54
if defined nobuild goto run
55
55
56
- if not defined VCINSTALLDIR echo Build skipped. To build, this file needs to run from VS cmd prompt.& goto run
57
-
56
+ @ rem Bail out early if not running in VS build env.
57
+ if defined VCINSTALLDIR goto msbuild-found
58
+ if not defined VS100COMNTOOLS goto msbuild-not-found
59
+ if not exist " %VS100COMNTOOLS% \..\..\vc\vcvarsall.bat" goto msbuild-not-found
60
+ call " %VS100COMNTOOLS% \..\..\vc\vcvarsall.bat"
61
+ if not defined VCINSTALLDIR goto msbuild-not-found
62
+ goto msbuild-found
63
+
64
+ :msbuild-not-found
65
+ echo Build skipped. To build, this file needs to run from VS cmd prompt.
66
+ goto run
67
+
68
+ :msbuild-found
58
69
@ rem Build the sln with msbuild.
59
70
msbuild node.sln /t:%target% /p:Configuration=%config% /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo
60
71
if errorlevel 1 goto exit
You can’t perform that action at this time.
0 commit comments