Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when removing unassigned files from solution folders in VS Experimental Instance with Demo Extension #469

Open
Matt-17 opened this issue Nov 13, 2023 · 0 comments

Comments

@Matt-17
Copy link
Contributor

Matt-17 commented Nov 13, 2023

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

  1. Open Visual Studio Experimental Instance with the demo extension installed.
  2. Add files to a solution folder without associating them with any project.
  3. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant