From: Anthony Wieser on
I've just downloaded the trial version of VS2010 pro with a view to
upgrading, loaded up one of my existing projects, and (fingers crossed)
pressed the build button.

Unfortunatley, I've fallen at the first hurdle.

My project includes an HTML help workshop hhp file, to build it's CHM file,
and that is built as a custom build step, like this:
hhc.exe .\hlp\%(Filename).hhp

Unfortunately, hhc.exe returns an error code of 1 when it works, resulting
in the following MSBUILD error:
1>C:\Program
Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(151,5): error
MSB6006: "cmd.exe" exited with code 1.

That error is contained here:
<CustomBuild
Sources ="@(CustomBuild)"
BuildSuffix ="$(BuildSuffix)"

TrackerLogDirectory ="%(CustomBuild.TrackerLogDirectory)"
MinimalRebuildFromTracking
="%(CustomBuild.MinimalRebuildFromTracking)"

TLogReadFiles ="@(CustomBuildTLogReadFiles)"
TLogWriteFiles ="@(CustomBuildTLogWriteFiles)"
TrackFileAccess ="$(TrackFileAccess)"
ToolArchitecture ="$(CustomBuildToolArchitecture)"
TrackerFrameworkPath ="$(CustomBuildTrackerFrameworkPath)"
TrackerSdkPath ="$(CustomBuildTrackerSdkPath)"

AcceptableNonZeroExitCodes
="%(CustomBuild.AcceptableNonZeroExitCodes)"
>
</CustomBuild>

I've searched for AcceptableNonZeroExitCodes but can't find anything to
enlighten me on how to accept 1 as a valid code.

Any ideas?

--
Anthony Wieser
Wieser Software Ltd

From: Ismo Salonen on
Anthony Wieser wrote:
> I've just downloaded the trial version of VS2010 pro with a view to
> upgrading, loaded up one of my existing projects, and (fingers crossed)
> pressed the build button.
>
> Unfortunatley, I've fallen at the first hurdle.
>
> My project includes an HTML help workshop hhp file, to build it's CHM
> file, and that is built as a custom build step, like this:
> hhc.exe .\hlp\%(Filename).hhp
>
> Unfortunately, hhc.exe returns an error code of 1 when it works,
> resulting in the following MSBUILD error:
> 1>C:\Program
> Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(151,5):
> error MSB6006: "cmd.exe" exited with code 1.
>
> That error is contained here:
> <CustomBuild
> Sources ="@(CustomBuild)"
> BuildSuffix ="$(BuildSuffix)"
>
> TrackerLogDirectory ="%(CustomBuild.TrackerLogDirectory)"
> MinimalRebuildFromTracking
> ="%(CustomBuild.MinimalRebuildFromTracking)"
>
> TLogReadFiles ="@(CustomBuildTLogReadFiles)"
> TLogWriteFiles ="@(CustomBuildTLogWriteFiles)"
> TrackFileAccess ="$(TrackFileAccess)"
> ToolArchitecture ="$(CustomBuildToolArchitecture)"
> TrackerFrameworkPath ="$(CustomBuildTrackerFrameworkPath)"
> TrackerSdkPath ="$(CustomBuildTrackerSdkPath)"
>
> AcceptableNonZeroExitCodes
> ="%(CustomBuild.AcceptableNonZeroExitCodes)"
> >
> </CustomBuild>
>
> I've searched for AcceptableNonZeroExitCodes but can't find anything to
> enlighten me on how to accept 1 as a valid code.
>
> Any ideas?
>
Create an helper bat which exists with wanted error code ?

ismo
From: Ulrich Eckhardt on
Anthony Wieser wrote:
> My project includes an HTML help workshop hhp file, to build it's CHM
> file, and that is built as a custom build step, like this:
> hhc.exe .\hlp\%(Filename).hhp
>
> Unfortunately, hhc.exe returns an error code of 1 when it works, resulting
> in the following MSBUILD error:
> 1>C:\Program
> Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(151,5): error
> MSB6006: "cmd.exe" exited with code 1.

Hmm, last time I looked (VS2005) you could define multiple lines for the
custom build step:

hhc.exe ...
if %ERRORLEVEL%==1 (
exit /b 0
) else (
echo hhc failed with errorcode %ERRORLEVEL%
exit /b 1
)

Uli

--
C++ FAQ: http://parashift.com/c++-faq-lite

Sator Laser GmbH
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932