Community.VisualStudio.Toolkit
Community.VisualStudio.Toolkit copied to clipboard
Error when removing unassigned files from solution folders in VS Experimental Instance with Demo Extension
Description
I encountered an error in Visual Studio when performing file operations within the Solution Explorer. Specifically, the error arises when I remove files that are not associated with any project but are added to solution folders. This minor issue seems to be triggered only when the demo extension is installed in my Visual Studio Experimental Instance.
Steps to Reproduce
- Open Visual Studio Experimental Instance with the demo extension installed.
- Add files to a solution folder without associating them with any project.
- Attempt to remove these files from the solution folder.
Expected Behavior
The files should be removed without any errors.
Actual Behavior
An error occurs, which seems to stem from a null reference exception. The specific line of code causing the issue is in TestExtensionPackage.cs
at line 90:
string info = string.Join(",", obj.ProjectItemRemoves.Select(x => $"{x.Project.Name}:{x.RemovedItemName}"));
It appears that x.Project is null at this point, leading to the error when attempting to access its Name property.