This documentation is archived and is not being maintained.

The parent file, 'file1', for file 'file2' cannot be found in the project file

Visual Studio .NET 2003

The project system cannot find a node corresponding to a file.

Dependent files are persisted in the project file by adding a DependentUpon attribute to the <File> node. For example:

<File
   RelPath = "Form1.resx"
   SubType = "Code"
   BuildAction = "EmbeddedResource"
   DependentUpon="Form1.vb"
/>

This will make Form1.resx appear below Form1.vb in the project hierarchy.

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

To correct this error

  • Edit and update the project file.

    The affected files will be added to the project, however, the dependency will not be preserved.

See Also

Managing Projects

Show: