How to interpret pre build error codes from Visual Studio 2010
I have been working with Visual Studio pre build events and I find the error codes rather unhelpful
for example, adding a pre-build event like th开发者_JS百科is:
$(ProjectPath)\DoStuff.exe
This gives me an error: exited with code 267
Or adding like this:
$(ProjectDir)\DoStuff.exe
This gives me an error: exited with code 9009
After a bit of poking about it's possible to figure out what needs to be changed to get the command line to work, but it would probably be far simpler if I could look up the error code and see what it meant.
I have tried google with some of these error codes but some are really hard to find any information about - for example 267 seems rather elusive.
Is there a list somewhere that defines all these error codes?
:)
Avoid shooting the messenger. Talk to the owner of DoStuff.exe and ask what these process exit codes mean.
If you have reason to believe that DoStuff is buggy and doesn't set the exit code properly then you can work around it by resetting the %errorlevel% value. Make it look like this:
dostuff.exe
cmd /c ""
The error codes you see could be Windows error codes as declared in the SDK's WinError.h file. Error 267 is ERROR_DIRECTORY, "The directory name is invalid". Error 9009 is DNS_ERROR_RCODE_NOTAUTH, "DNS server not authoritative for zone".
精彩评论