Skip to content

Delete the SolutionExplorerShim assembly and merge it into our VisualStudio.Implementation project#48831

Merged
jasonmalinowski merged 13 commits intodotnet:masterfrom
jasonmalinowski:delete-the-solutionexplorershim-assembly
Oct 23, 2020
Merged

Delete the SolutionExplorerShim assembly and merge it into our VisualStudio.Implementation project#48831
jasonmalinowski merged 13 commits intodotnet:masterfrom
jasonmalinowski:delete-the-solutionexplorershim-assembly

Conversation

@jasonmalinowski
Copy link
Member

We add the Analyzers node and related nodes to the Solution Explorer via an API that was exposed via MEF. Because there was
no way to control which projects loaded us, we loaded always, even in solutions that didn't contain C# or VB. To limit the damage, we had a separate assembly that carefully avoided ever loading C# or VB unless we actually had a project around.

The shell has updated the Solution Explorer API to allow us to specify as MEF metadata which projects we should apply to. This allows us to only be created when necessary, which means we can delete the entire assembly and merge it back in. We can also delete a bunch of lazy loading hacks and generally clean all sorts of things up.

Commit at a time is highly recommended here.

@Dotnet-GitSync-Bot

This comment has been minimized.

This was needed because we didn't want to load all of Roslyn if we were
being loaded to apply to a project that was not C#/VB. That's no longer
a concern now that we use AppliesToProject.

This also cleans things up so we are able to use the same constructor
for both the product and tests.
This was needed because we didn't want to load all of Roslyn if we were
being loaded to apply to a project that was not C#/VB. That's no longer
a concern now that we use AppliesToProject.
This was needed because we didn't want to load all of Roslyn if we were
being loaded to apply to a project that was not C#/VB. That's no longer
a concern now that we use AppliesToProject.
This was helping with the lazy redirection, and if this was hosted in
non-Visual Studio editors. We'll remove it for now.
We have no need for a separate project now, so just move them back into
another project. We choose to put it in our Implementation project,
because LocalizableProperties is public for COM marshalling.

Some namespace qualifications are changing because:

1. The namespace that contained the resources is implicitly changing
   since the RESX generates into the default namespace for the project.
2. We are now referencing Microsoft.VisualStudio.CodeAnalysis.Sdk.UI
   in the Implementation project which causes some collisions with
   the CodeAnalysis namespace of our own.
@jasonmalinowski jasonmalinowski force-pushed the delete-the-solutionexplorershim-assembly branch from d1c1239 to 472d27f Compare October 22, 2020 01:14
@jasonmalinowski jasonmalinowski marked this pull request as ready for review October 22, 2020 01:15
@jasonmalinowski jasonmalinowski requested review from a team as code owners October 22, 2020 01:15
@jasonmalinowski
Copy link
Member Author

I suspect @mavasani and @tmeschter will be happy to see this project and the lazy loading hacks going away.

@mavasani mavasani self-assigned this Oct 22, 2020
@jasonmalinowski jasonmalinowski force-pushed the delete-the-solutionexplorershim-assembly branch from 472d27f to e0dede2 Compare October 22, 2020 01:52
Copy link
Contributor

@mavasani mavasani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Glad to see this project going away...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Define a string constant given it is used more than once?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought about it, but I wasn't sure anything would be really clearer than just seeing the literal expression. And even if somebody did have to change this, I imagine they'd have to re audit all of the other ones to see if they still made sense, so this isn't really a good case where a constant means you can change it in one place and not have to worry about bugs you introduced.

@jasonmalinowski jasonmalinowski force-pushed the delete-the-solutionexplorershim-assembly branch 2 times, most recently from bc58ee4 to 2eeee26 Compare October 22, 2020 19:40
@jasonmalinowski jasonmalinowski self-assigned this Oct 22, 2020
@jasonmalinowski jasonmalinowski force-pushed the delete-the-solutionexplorershim-assembly branch from 2eeee26 to 5e98436 Compare October 22, 2020 23:50
…Explorer

We don't need to OptProf train it anymore now that it doesn't exist.
@jasonmalinowski jasonmalinowski merged commit 0338522 into dotnet:master Oct 23, 2020
@jasonmalinowski jasonmalinowski deleted the delete-the-solutionexplorershim-assembly branch October 23, 2020 23:33
@ghost ghost added this to the Next milestone Oct 23, 2020
@allisonchou allisonchou removed this from the Next milestone Nov 24, 2020
@allisonchou allisonchou added this to the 16.9.P2 milestone Nov 24, 2020
@sharwell sharwell mentioned this pull request Jul 30, 2021
24 tasks
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

Successfully merging this pull request may close these issues.

4 participants