这个错误消息是什么意思?我能做些什么来纠正这个问题?

AssemblyInfo.cs退出,代码为9009


这个问题可能是在Visual Studio中的. net解决方案的构建后步骤中发生的。


当前回答

Yet another reason: If your pre-build event references another projects bin path and you see this error when running msbuild, but not Visual Studio, then you have to manually arrange the projects in the *.sln file (with a text editor) so that the project you are targeting in the event is built before the event's project. In other words, msbuild uses the order that projects are listed in the *.sln file whereas VS uses knowledge of project dependencies. I had this happen when a tool that creates a database to be included in a wixproj was listed after the wixproj.

其他回答

在Win 7的环境变量中改变PATH变量后,有相同的变量。更改回默认值有帮助。

至少在Visual Studio Ultimate 2013, Version 12.0.30723.00 Update 3中,不能用换行符分隔if/else语句:

工作原理:

if '$(BuildingInsideVisualStudio)' == 'true' (echo local) else (echo server)

不工作:

if '$(BuildingInsideVisualStudio)' == 'true' (echo local) 
else (echo server)

另一个变体:

今天我在win32中从cron调用python解释器并取ExitCode (%ERRORLEVEL%) 9009,因为cron使用的系统帐户没有python目录的路径。

在我的情况下,在调用命令之前,我必须先“CD”(更改目录)到适当的目录,因为我调用的可执行文件在我的项目目录中。

例子:

cd "$(SolutionDir)"
call "$(SolutionDir)build.bat"

当我将App.config的属性更改为始终复制时,它发生在我身上

通过撤销我所有的编辑来修复它,然后构建以确保它工作

最后重置它,总是复制和构建它工作