The folder 'folder' could not be added to the project. <reason>

A folder read from the .vbproj or .csproj file cannot be added to the project. Reasons include:

  • Invalid name

  • File within a path. For example, if you have a project-relative path of Folder1\Folder2\Folder3, but there is also a file with relative path Folder1\Folder2.

  • Item already exists. This occurs when a folder is listed twice in the project file.

This error is most likely caused by editing the project file by hand.

To correct this error

  • Remove the affected folder node from the project file.

    Any folder, and any files below the folder, for which this diagnostic is displayed will not be added to the project.

See Also

Reference

Project Files

Other Resources

Project Properties (Visual Studio)