这个错误消息是什么意思?我能做些什么来纠正这个问题?
AssemblyInfo.cs退出,代码为9009
这个问题可能是在Visual Studio中的. net解决方案的构建后步骤中发生的。
这个错误消息是什么意思?我能做些什么来纠正这个问题?
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样式的&quot字符串。
<!-- Needs quotes example with my Buildscript.msbuild file -->
<Exec Command=""$(MSBuildThisFileDirectory)\wix\wixscript.bat" $(VersionNumber) $(VersionNumberShort)"
ContinueOnError="false"
IgnoreExitCode="false"
WorkingDirectory="$(MSBuildProjectDirectory)\wix" />
对我来说,磁盘空间很低,无法写入的文件预计以后会出现。其他答案提到了丢失的文件(或命名错误/不恰当地引用了文件名称)——但根本原因是磁盘空间不足。
我认为在我的情况下,路径中有俄罗斯符号(所有项目都在用户文件夹中)。当我把溶液放在另一个文件夹(直接在磁盘上)时,一切都变得正常了。
对我来说,它发生在一个大型解决方案(~80个项目)中从一个PostSharp版本升级到下一个版本的nuget包之后。 我在预构建事件中有命令的项目有编译器错误。
'cmd'不能被识别为内部或外部命令、可操作程序或批处理文件。 C:\Program Files (x86)\MSBuild\14.0\bin\ Microsoft.Common.CurrentVersion.targets(1249,5):错误MSB3073:命令"cmd /c c:\GitRepos\main\ServiceInterfaces\DEV.Config\PreBuild. config . exe "cmd ServiceInterfaces退出,代码为9009。
PATH变量已损坏,变得太长,与PostSharp.Patterns.Diagnostics相关的多个重复路径。 当我关闭Visual Studio并再次打开它时,问题就解决了。
我在编校Path环境变量时导致了此错误。编辑后,我不小心将Path=添加到路径字符串的开头。使用这样一个格式不正确的路径变量,我无法在命令行上运行XCopy(没有找到命令或文件),Visual Studio拒绝运行构建后步骤,并引用代码9009的错误。
XCopy通常位于c:\ windows \ system32。一旦Path环境变量允许XCopy在DOS提示符下得到解析,Visual Studio就很好地构建了我的解决方案。