mhutch / MonoDevelop.AddinMaker

Extension to make it easier to create Visual Studio for Mac / MonoDevelop extensions
MIT License
50 stars 26 forks source link

Duplicate reference in Solution pad #20

Closed mrward closed 8 years ago

mrward commented 8 years ago

With the roslyn build of monodevelop, and the roslyn branch of the addin maker installed, when a reference is added to the project you get a duplicate reference added to the solution pad.

To repro:

  1. Create a C# console app.
  2. Double click the References node in the Solution pad to open the Edit References dialog.
  3. Select System.Xml and OK the dialog.

    Expected result:

Single System.Xml node in References in the Solution pad.

Actual result:

Two System.Xml nodes in References.

Debugging this it looks like the addin maker refreshes all child nodes of the project when any reference is changed. Whilst MonoDevelop is not expecting this and will add a new tree node.

Not sure where best to fix this. I guess MonoDevelop could be made more defensive to handle an existing reference. Or maybe the addin maker could only refresh its AddinReferenceFolder, assuming that is all that needs to be refreshed.

mhutch commented 8 years ago

Yes, I think it just needs to refresh its folder.