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

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.

由于路径中有空格,还没有找到文件的另一个变体。在我的情况下,在msbuild脚本。我需要在exec命令中使用HTML样式的&ampquot字符串。

<!-- Needs quotes example with my Buildscript.msbuild file --> 
<Exec Command="&quot;$(MSBuildThisFileDirectory)\wix\wixscript.bat&quot; $(VersionNumber) $(VersionNumberShort)" 
    ContinueOnError="false" 
    IgnoreExitCode="false" 
    WorkingDirectory="$(MSBuildProjectDirectory)\wix" />

当找不到signtool.exe本身时,我实际上得到了这个错误消息。为了解决这个问题,我将文件夹路径添加到path环境变量中,并重新启动Visual Studio。

Tfa的回答被否决了,但实际上会导致这个问题。 多亏了hanzolo,我在输出窗口中找到了以下内容:

3>'gulp' is not recognized as an internal or external command,
3>operable program or batch file.
3>D:\dev\<filepath>\Web.csproj(4,5): error MSB3073: The command "gulp clean" exited with code 9009.

在运行npm install -g gulp后,我不再得到这个错误。如果在Visual Studio中出现此错误,请检查输出窗口并查看问题是否是未设置的环境变量。