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

AssemblyInfo.cs退出,代码为9009


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


当前回答

这是非常基本的,我遇到过这样的问题,而且是令人尴尬的简单失败。

应用程序使用命令行参数,我删除了它们,然后将它们添加回来。突然,这个项目没能建成。

Visual Studio ->项目属性->验证您使用的是“调试”选项卡(而不是“生成事件”选项卡)->命令行参数

我使用了和Post/Pre-build文本区域,这在这种情况下是错误的。

其他回答

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.

我认为在我的情况下,路径中有俄罗斯符号(所有项目都在用户文件夹中)。当我把溶液放在另一个文件夹(直接在磁盘上)时,一切都变得正常了。

我的解决方案是创建文件的副本,并在构建任务中添加一个步骤,将我的文件复制到原始文件之上。

我也有类似的问题,我收到了:

命令 ”“C: \ <用户> \用户下载\ XmlDoc2CmdletDoc.0.3.0 \建立. . \ \ sandbox-attacksurface-analysis-tools-c02ed8ba04324e54a0a188ab9877ee6aa372dfac \包工具” C:\Users<user>\Downloads\sandbox-attack - surface-analysis-tools-c02ed8ba04324e54a0a188ab9877ee6aa372dfac\bin\Debug\NtObjectManager.dll" 用代码9009退出。

我当到项目属性>构建和检查XML文档文件:

在那之后,我重建了这个项目,但它消失了。奇怪的是,在我再次选中复选框并重新构建它之后,错误没有返回。 重影故障. .

如果脚本确实做了它需要做的事情,而Visual Studio只是因为错误而困扰你,你可以添加:

exit 0

到你剧本的结尾。