History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: QB-955
Type: Bug Bug
Status: Closed Closed
Resolution: Won't Fix
Priority: Major Major
Assignee: Robin Shen
Reporter: Jan Koprowski
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
QuickBuild

Indicating msbuild to use by PATH env variable does not work

Created: 20/Jun/11 07:51 AM   Updated: 20/Jun/11 09:19 AM
Component/s: None
Affects Version/s: 3.1.47
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
Environment:
Server:
SLES 10

Agent:
VisualStudio 2010
Windows 2008


 Description  « Hide
After setting "Environment Variables": "PATH" => %PATH%;C:\Windows\Microsoft.NET\Framework\v4.0.30319 in MSBuild step QuickBuild still claim there is no msbuild command in PATH.

 All   Comments   Work Log   Change History      Sort Order:
Robin Shen [20/Jun/11 08:35 AM]
Due to JVM limitation, MSBuild executable is resolved before environment taking effect. To workaround the issue, please specify MSBuild path in MSBuild plugin setting page ( "Administration/Plugin Management").

Jan Koprowski [20/Jun/11 09:19 AM]
Nevertheless I have projects compiling on different VisualStudio versions and will be nice to be able to work with each of them.
In VisualStudio there is C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat file where You pass as parameter architecture You need.
This batch file modify environment (e.g. PATH variable) setting it for appropriate msbuild appropriate for passed architecture: x86, x64 and so on...

Running this command from appropriate Visual Studio just before "msbuild" will solve the problem.
Something like:


call "%VS100COMNTOOLS%\vcvars32.bat"
call "%VCINSTALLDIR%\vcvarsall.bat" ARCHITECTURE

where ARCHITECTURE could be: x86, amd64, x64, ia64, x86_amd64, x86_ia64

and then msbuild available in PATH will be the appropriate one.

Maybe this approach is too general for solving this problem but I hope this can be a good tip to find solution and make QuickBuild even better :)