Alex Rivera | Logout

What does "exited with code 9009" mean during this build?

Asked 2009-08-29T16:31:49.657
345

What does this error message mean? What could I do to correct this issue?

AssemblyInfo.cs exited with code 9009


The problem is probably happening as part of a post-build step in a .NET solution in Visual Studio.

Edit
Report

3 Answers

255

Did you try to give the full path of the command that is running in the pre- or post-build event command?

I was getting the 9009 error due to a xcopy post-build event command in Visual Studio 2008.

The command "xcopy.exe /Y C:\projectpath\project.config C:\compilepath\" exited with code 9009.

But in my case it was also intermittent. That is, the error message persists until a restart of the computer, and disappears after a restart of the computer. It is back after some remotely related issue I am yet to discover.

However, in my case providing the command with its full path solved the issue:

c:\windows\system32\xcopy.exe /Y C:\projectpath\project.config C:\compilepath\ 

Instead of just:

xcopy.exe /Y C:\projectpath\project.config C:\compilepath\

If I do not have the full path, it runs for a while after a restart, and then stops.

Also as mentioned on the comments to this post, if there are spaces in full path, then one needs quotation marks around the command. E.g.

"C:\The folder with spaces\ABCDEF\xcopy.exe" /Y C:\projectpath\project.config C:\compilepath\

Note that this example with regards to spaces is not tested.

answered 2010-02-17T15:12:15.280
5

If the script actually does what it needs to do and it's just Visual Studio bugging you about the error you could just add:

exit 0

to the end of you script.

answered 2011-05-04T08:06:00.240
5

Check the spelling. I was trying to call an executable but had the name misspelled and it gave me the exited with code 9009 message.

answered 2012-06-06T20:17:27.423

Your Answer