Hi
if possible, use msbuild iso DevEnv, this is much more precise, and will fail the build if a project is not found. just use msbuild <yoursolution.sln> with kind regards Ruben Willems On Mon, May 11, 2009 at 6:55 PM, rdbossjr <[email protected]> wrote: > > Hello, > > We are using a batch file with a devenv.com call for a single ccnet > project. When one of the solutions has a project that can't be loaded > the log shows this: > > <message>One or more projects in the solution could not be loaded for > the following reason(s):</message> > <message>The project file or web has been moved, renamed or is not > on your computer.</message> > <message>These projects will be labeled as unavailable in Solution > Explorer. Expand the project node to show the reason the project could > not be loaded.1>------ Build started: Project: NextProject, > Configuration: Debug Win32 ------</message> > > I have two challenges here. > 1. Why doesn't the build go red when devenv can't load a project > that is supposed to be in the solution? > (maybe becasue devenv doesn't set ERRORLEVEL if this happens) > 2. Why does the last line get concatenated with the next project > build starting line? > > Here is a sample of my batch file that is generated dynamically rather > than using the Visual Studio Task in CCNet: > > @ECHO Off > :: Build Script Generated On 5/9/2009 10:49:43 PM > :: Directory Used: %CO_PATH%\Build\ > > SET BUILDFAILED=0 > SET compileType=/Build > ::SET compileType=/Rebuild > > :: FoundationSolution.sln > CD /D "%CO_PATH:/=\%\Build\FoundationSolution\" > :: ************************************************** > ECHO ^<Build name="FoundationSolution.sln" configuration="%buildCfg%| > Win32" time="%date% %time%" ^> > ECHO ^<Info message="'c:\program files\Microsoft Visual Studio > 8\Common7\IDE\devenv.com' '%CO_PATH%\Build\FoundationSolution > \FoundationSolution.sln' %compileType% '%buildCfg%'" time="%date% %time > %" /^> > "c:\program files\Microsoft Visual Studio 8\Common7\IDE\devenv.com" > "%CO_PATH%\Build\FoundationSolution\FoundationSolution.sln" > %compileType% "%buildCfg%" > IF %ERRORLEVEL% == 0 ( > ECHO ^<Result message="Success" time="%date% %time%" /^> > ) else ( > ECHO ^<Result message="Failed" time="%date% %time%" /^> > SET BUILDFAILED=1 > ) > ECHO ^</Build^> > > ECHO ^<Info message="Setting return code to %BUILDFAILED%" time="%date > % %time%" /^> > EXIT %BUILDFAILED% >
