Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This article describes the MSB3025 error code.
Message text
MSB3025: The source file 'path' is actually a directory. The 'Copy' task does not support copying directories.
Description
This error occurs when the Copy task is provided a path to a directory in the SourceFiles
parameter. Since the MSBuild Copy
task doesn't support copying directories, this is an error.
Resolution
If you control the build logic where the Copy
task is used, check your logic that creates the inputs for the SourceFiles
parameter to see whether the paths you're providing are the ones you intended. If your intention is to copy the contents of a directory, the SourceFiles
parameter of the Copy
task should be an item that includes the files in the directory.
This situation can easily occur in a build system if the folder structure changes and what was a path to a file is now a path to a folder. Update path inputs such as environment variables, command lines, and MSBuild properties to account for the new folder structure.
Applies to
All versions of MSBuild