Team Development for Sitecore ((TDS) from Hedgehog Development
Visual Studio 2013
Sitecore 6.6 (rev 131211)
TDS project error in Visual Studio when one or more file in the TDS project cannot be found:
Value cannot be null. Parameter name: path1
Warning: TDS could not load all files for the project. The files may be missing or corrupted. Please see the TDS pane in the output window for more details.
Seriousness of this Issue:
Critical: It locked up Visual Studio preventing me from taking any actions, so I had to kill Visual Studio (won’t even let me close the solution and can’t use solution after that).
The easy option would be to add the missing files on disk (and to your source archive) that the TDS project is listing in the Visual Studio Output Window / Team Development for Sitecore output. In my case, the issue of missing files came along because TDS complained of file names being too long so instead of adding the missing files, I had to remove references to the files from the TDS project manually. The initial issue I was facing was that sitecore item file names were too long when trying to “Get Sitecore items” and I tried the recommended option to use file system aliasing but ran into issues with that option described in TDS error: The specified path, file name, or both are too long..
How to manually edit a project file without corrupting it …
Step 1 > Right click on your project in solution explorer and select Unload Project
Step 2 > Right click on the project (tagged as unavailable in solution explorer)
and click “Edit yourproj.csproj”.
This will open up your CSPROJ file for editing.
Step 3 > After making any changes you want, save and close the file.
Right click again on the node and choose Reload project when done.
In Visual Studio, the TDS project error would not allow me to take any action in the solution, like unloading the project, so I manually edited the TDS project with Notepad to remove lines referring to files that were missing. This manual editing in Notepad caused other problems with the TDS project, but I was able to open Visual Studio and unload that TDS project and save the solution. Then, once I had the TDS project unloaded in the solution, I put the original (uncorrupted but error causing TDS project with files missing) back. Then, I did Step 2 above (removing the lines referring to files that were missing) and reloaded the TDS project. Then, I tested a “Sync with Sitecore” to confirm no files missing and saved the solution and TDS project.