I had to build a .sln file once where i had to call vcvarsall.bat and then figure out how to run the build within the environment the batch file setup since once the batch file ended the variables were gone.
Will On 02/19/2013 10:40 AM, Todd Greer wrote: > Sounds like a difference in your environment. Run "set" in place of > msbuild.exe, and compare the results. My guess is that you need to run the > batch file that sets up the environment for Visual Studio. It's exact name > and location vary according to platform and Visual Studio version, but in my > case, I have 'call "%VS100COMNTOOLS%\vsvars32.bat"' as part of my build > script. I think it can be known as vcvars32.bat, vcvars64.bat, vsvarsall.bat, > or some variant on one of those; consult your VS documentation. > > -- > Todd Greer > Principal Scientist, Affinegy, Inc. > > -----Original Message----- > From: jenkinsci-users@googlegroups.com > [mailto:jenkinsci-users@googlegroups.com] On Behalf Of zkhan > Sent: Friday, February 8, 2013 4:18 PM > To: jenkinsci-users@googlegroups.com > Subject: Msbuild from Jenkins gives different results than from command line? > > I am trying to build a VS .sln that has multiple C++ .vcproj's in it. The > solution file is generated using CMake and I've got this part working. To > build the solution file, I am using msbuild. I am able to build the solution > using both Visual Studio and from the command line with the following > command: > > C:\Jenkins\workspace\SonioTest>"C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe" > /t:Rebuild bin/SonIO.sln > > This builds successfully (on the same machine that Jenkins resides). > > However, I am trying to automate this portion of the build in Jenkins and the > build ends up failing with a couple of C1083 errors ("Cannot open source > file: '..\path\to\file.ext': No such file or directory). I have tried using > both the Jenkins msbuild plugin and using the exact same command that works > in the terminal as a "Execute Windows batch command" build step, with the > same result. > > Any ideas why I'm seeing this difference of behavior between Jenkins and the > command line? > > > > -- > View this message in context: > http://jenkins.361315.n4.nabble.com/Msbuild-from-Jenkins-gives-different-results-than-from-command-line-tp4654923.html > Sent from the Jenkins users mailing list archive at Nabble.com. > > -- > You received this message because you are subscribed to the Google Groups > "Jenkins Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to jenkinsci-users+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > > -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.