本文介绍MSB1013错误代码。
消息文本
MSB1013: The response file was specified twice. A response file can be specified only once. Any files named 'msbuild.rsp' in the directory of MSBuild.exe or in the directory of the first project or solution built (which if no project or solution is specified is the current working directory) were automatically used as response files.
DESCRIPTION
响应文件是包含要传递给 MSBuild.exe的命令行开关的文本文件。 可以使用响应文件来避免重复键入相同的开关。 可以改为传入响应文件。 响应文件可以包含 @ 开关,以便进一步包含其他响应文件。 为了防止循环引用,MSBuild 禁止包含相同的响应文件两次。 此错误消息后跟导致重复响应文件的确切 @ 开关。 请参阅 MSBuild 响应文件。
决议
响应文件具有扩展名 .rsp
,通常位于项目或解决方案文件夹中。 如果你有嵌套的响应文件,请考虑组合或更改响应文件的结构,或更改包含逻辑以避免包括同一响应文件两次。
如果文件Directory.Build.rsp
存在,它会被自动找到,因此,在命令行中显式添加@Directory.Build.rsp
会是一个错误。
适用对象
MSBuild 的所有版本