Edit

Share via


MSB1013 diagnostic code

This article describes the MSB1013 error code.

Message text

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

Response files are text files that contain command-line switches to be passed to MSBuild.exe. You can use response files to avoid typing the same switches repeatedly. You can just pass in the response file instead. Response files can include the @ switch in order to further include other response files. In order to prevent a circular reference, MSBuild disallows the same response file from being included twice. This error message would be followed by the exact @ switch that resulted in the duplicate response file. See MSBuild response files.

Resolution

Response files have the extension .rsp and are typically located in the project or solution folders. If you have nested response files, consider combining or otherwise changing the structure of the response files, or changing the inclusion logic to avoid including the same response file twice.

The file Directory.Build.rsp is found automatically if it exists, so if you have one, it's an error to add @Directory.Build.rsp explicitly on the command line.

Applies to

All versions of MSBuild