When: 1) A cmd prompt is opened (in this case using the VS2010 CMD prompt) 2) A batch file which has setlocal also has a "set projectPath=some_path_to_a_folder" (case of the variable name does not matter) 3) And at some point in the same batch file or a different batch file (also using setlocal) but executed in the same CMD window, then light.exe generates LGHT0281 with the message "error LGHT0281: The -wixprojectfile option requires a file, but the provided path is a directory: <path to the project without project name>" It also displays the full path to the project file, including the project fil name, as passed into MSBuild. So the message is confusing.
Even after the variable in the batch script is removed or renamed, LGHT0281 error continues to be reported until the CMD window is closed and the changed batch file is executed in a new CMD window. While this behavior is a little different than the original post, the core issue seems to be that variables in batch scripts, even different batch scripts run in a particular CMD window, are in the same namespace as environment variables and MSBuild variable, so it would be wise to prefix variable names in a unique manner. -- View this message in context: http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Environment-variable-ProjectPath-is-expanded-possible-to-turn-off-tp7587463p7594066.html Sent from the wix-users mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Put Bad Developers to Shame Dominate Development with Jenkins Continuous Integration Continuously Automate Build, Test & Deployment Start a new project now. Try Jenkins in the cloud. http://p.sf.net/sfu/13600_Cloudbees _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users