Edit

Share via


MSB3021

This diagnostic code is emitted when an error occurs when trying to copy a file. The error text from the operating system is displayed, which usually provides specific information about the failure.

The message resembles the following, but this text is followed by additional information from the operating system:

MSB3021: Unable to copy file 'source' to 'destination'.

Look to the additional information provided by the operating system to determine the cause of the problem. Common causes include the file is locked by another process, insufficient permissions to write to the destination folder, insufficient space on the drive, and so on. Make sure the file is not in use, that MSBuild has write permissions on the destination folder, and that there is sufficient space on the disk.