What does “exited with code 9009” mean during this

2019-01-02 17:53发布

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.

29条回答
听够珍惜
2楼-- · 2019-01-02 18:20

My exact error was

The command "iscc /DConfigurationName=Debug "C:\Projects\Blahblahblah\setup.iss"" exited with code 9009.

9009 means file not found, but it actually couldn't find the "iscc" part of the command.

I fixed it by adding ";C:\Program Files\Inno Setup 5 (x86)\" to the system environment variable "path"

查看更多
何处买醉
3楼-- · 2019-01-02 18:21

In my case I had to "CD" (Change Directory) to the proper directory first, before calling the command, since the executable I was calling was in my project directory.

Example:

cd "$(SolutionDir)"
call "$(SolutionDir)build.bat"
查看更多
爱死公子算了
4楼-- · 2019-01-02 18:24

It happens when you are missing some environment settings for using Microsoft Visual Studio 2010 x86 tools.
Therefore, try adding as a first command in your post-build steps:

call "$(DevEnvDir)..\Tools\vsvars32.bat"

It should be placed before any other command.
It will set environment for using Microsoft Visual Studio 2010 x86 tools.

查看更多
ら面具成の殇う
5楼-- · 2019-01-02 18:24

This is pretty basic, I had this problem, and embarrassing simple fail.

Application use Command line arguments, I removed them and then added them back. Suddenly the project failed to build.

Visual Studio -> Project Properties -> verify that you use 'Debug' tab (not 'Build Events' tab) -> Command Line Arguments

I used the and Post/Pre-build text area, which was wrong this case.

查看更多
爱死公子算了
6楼-- · 2019-01-02 18:26

I have had the error 9009 when my post build event script was trying to run a batch file that did not exist in the path specified.

查看更多
笑指拈花
7楼-- · 2019-01-02 18:27

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.

查看更多
登录 后发表回答