Skip to content

VSSolutionManager.EnsureInitializeAsync should not subscribe to SolutionEvents multiple times when the project initialization fails #12044

Open

Description

@nkolev92

Say you have a large solution with many projects and EnsureInitializeAsync runs.
We get through the InitializeAsync part which adds listeners to the solution events and later we fail by throwing in EnsureNuGetAndVsProjectAdapterCacheAsync.

We can do one of the following:

  • We already differentiate between cache initialization and overall initializaiton. It'd be cheap to just set initialize even if the cache initialization fails, but obviously let the cache initialization fail.
  • Introduce another init concept, potentially one that unsubscribes when cache initialization fails inside of EnsureInitializeAsync

I am leaning toward the first approach, but this requires more thought.

Related internal issue 1591242

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions