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:27

Also, make sure there are no line breaks in the post build event editing window on your project. Sometimes copying the xcopy command from the web when it's multi-line and pasting it into VS will cause a problem.

查看更多
后来的你喜欢了谁
3楼-- · 2019-01-02 18:27

My solution was to create a copy of the file and add a step to the build task to copy my file over the original.

查看更多
流年柔荑漫光年
4楼-- · 2019-01-02 18:28

My solution was just simple as: have you tried turning it off and on again? So I restarted the computer and the issue was gone.

查看更多
回忆,回不去的记忆
5楼-- · 2019-01-02 18:29

For me it happened after upgrade nuget packages from one PostSharp version to next one in a big solution (~80 project). I've got compiler errors for projects that have commands in PreBuild events.

'cmd' is not recognized as an internal or external command, operable program or batch file. C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1249,5): error MSB3073: The command "cmd /c C:\GitRepos\main\ServiceInterfaces\DEV.Config\PreBuild.cmd ServiceInterfaces" exited with code 9009.

PATH variable was corrupted becoming too long with multiple repeated paths related to PostSharp.Patterns.Diagnostics. When I closed Visual Studio and opened it again, the problem was fixed.

查看更多
永恒的永恒
6楼-- · 2019-01-02 18:30

The problem in my case occurred when I tried to use a command on the command-line for the Post-build event in my Test Class Library. When you use quotation marks like so:

"$(SolutionDir)\packages\NUnit.Runners.2.6.2\tools\nunit" "$(TargetPath)" 

or if you're using the console:

"$(SolutionDir)\packages\NUnit.Runners.2.6.2\tools\nunit-console" "$(TargetPath)"

This fixed the issue for me.

查看更多
春风洒进眼中
7楼-- · 2019-01-02 18:32

Had the same variable after changing PATH variable from Environmental Variables in Win 7. Changing back to default helped.

查看更多
登录 后发表回答