This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Before running the tools in MSVC, the Microsoft supplied batch file vcvarsall.bat needs to be run. This file is located in (INSTALL DIR)Microsoft Visual Studio 9.0\VC The batch file runs another batch file, which sets various windows paths. These values need to be in windows form, not cygwin form. It is not sufficient to call this batch file from a make file, because the values will not be exported into the make shell, nor the cygwin environment. Looking in the original batch file for Microsoft Visual Studio 9.0, I have identified: PATH WindowsSdkDir VSINSTALLDIR VCINSTALLDIR FrameworkDir FrameworkVersion Framework35Version INCLUDE LIB DevEnvDir LIBPATH One can set these values directly in the make environment, but care must be taken with the backslashes, spaces, and semicolons of windows paths. At least some of them, I wrote a few bash scripts which I put into the nbproject directory, I'll attach them. I am using them like this: WIN_PATH="Q:\\bin\\Microsoft Visual Studio 9.0\\Common7\\IDE;Q:\\bin\\Microsoft Visual Studio 9.0\\VC\\BIN;Q:\\bin\\Microsoft Visual Studio 9.0\\Common7\\Tools;C:\\WINDOWS\\Microsoft.NET\\Framework\\v3.5;C:\\WINDOWS\\Microsoft.NET\\Framework\\v2.0.50727;Q:\\bin\\Microsoft Visual Studio 9.0\\VC\\VCPackages;$(WindowsSdkDir)\\bin" cygwin_path=$(shell nbproject/win_to_cygwin_path $(WIN_PATH)) export PATH:=$(cygwin_path):$(PATH) At the moment, I have not verified that I have correctly integrated the variables above into both the cygwin and windows environments.
Created attachment 77178 [details] bash script to convert windows path to cygwin path
Created attachment 77179 [details] script to covert cygwin path to windows path
Created attachment 77180 [details] script to covert windows path to dos path
Related to issue 158866
BTW, this is what I added to an unrelated Ant script to get the VS tools to run from an <exec></exec> task: Visual Studio is on a separate drive, in "Q:\bin\Microsoft Visual Studio 9.0". The spaces in the path are a PAIN. <property name="VSINSTALLDIR" location="Q:\bin\MICROS~1.0"/> <property name="VCINSTALLDIR" location="Q:\bin\MICROS~1.0\VC"/> <property name="FrameworkDir" location="C:\WINDOWS\Microsoft.NET\Framework"/> <property name="FrameworkVersion" value="v2.0.50727"/> <property name="Framework35Version" value="v3.5"/> <property name="WindowsSdkDir" location="c:\PROGRA~1\MI2578~1\Windows\v6.0A\"/> <property name="WIN_PATH_0" location="${WindowsSdkDir}\bin"/> <property name="INCLUDE_0" location="${WindowsSdkDir}\include"/> <property name="LIB_0" location="${WindowsSdkDir}\lib"/> <property name="DevEnvDir" location="Q:\bin\MICROS~1.0\Common7\IDE"/> <property name="INCLUDE" location="Q:\bin\MICROS~1.0\VC\ATLMFC\INCLUDE;Q:\bin\MICROS~1.0\VC\INCLUDE;${INCLUDE_0}"/> <property name="LIB" location="Q:\bin\MICROS~1.0\VC\ATLMFC\LIB;Q:\bin\MICROS~1.0\VC\LIB;${LIB_0}"/> <property name="LIBPATH" location="C:\WINDOWS\Microsoft.NET\Framework\v3.5;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727;Q:\bin\MICROS~1.0\VC\ATLMFC\LIB;Q:\bin\MICROS~1.0\VC\LIB"/> <property name="WIN_PATH" location="Q:\bin\MICROS~1.0\Common7\IDE;Q:\bin\MICROS~1.0\VC\BIN;Q:\bin\MICROS~1.0\Common7\Tools;C:\WINDOWS\Microsoft.NET\Framework\v3.5;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727;Q:\bin\MICROS~1.0\VC\VCPackages;${WIN_PATH_0}"/> <property name="PATH" location="${WIN_PATH};${env.Path};"/> <exec executable="${vs.tool.exe}" > <arg line="${vs.tool.argline}"/> <env key="VSINSTALLDIR" value="${VSINSTALLDIR}"/> <env key="VCINSTALLDIR" value="${VCINSTALLDIR}"/> <env key="FrameworkDir" value="${FrameworkDir}"/> <env key="FrameworkVersion" value="${FrameworkVersion}"/> <env key="Framework35Version" value="${Framework35Version}"/> <env key="WindowsSdkDir" value="${WindowsSdkDir}"/> <env key="INCLUDE" value="${INCLUDE}"/> <env key="LIB" value="${LIB}"/> <env key="DevEnvDir" value="${DevEnvDir}"/> <env key="LIBPATH" value="${LIBPATH}"/> <env key="PATH" path="${PATH}"/> </exec>