Skip to content

Commit

Permalink
Merge pull request #66797 from sharwell/vb-package
Browse files Browse the repository at this point in the history
Remove UI dependencies from VisualBasicPackage constructor
  • Loading branch information
sharwell committed Feb 15, 2023
2 parents b45156f + 5b3953b commit ff2ac53
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ Namespace Microsoft.VisualStudio.LanguageServices.VisualBasic
Public Sub New()
MyBase.New()

' This is a UI-affinitized operation. Currently this opeartion prevents setting AllowsBackgroundLoad for
' VisualBasicPackage. The call should be removed from the constructor, and the package set back to allowing
' background loads.
_comAggregate = Implementation.Interop.ComAggregate.CreateAggregatedObject(Me)
End Sub

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
</PropertyGroup>
<ItemGroup Label="PkgDef">
<PkgDefInstalledProduct Include="{574fc912-f74f-4b4e-92c3-f695c208a2bb}" Name="Microsoft Visual Basic" DisplayName="#113" ProductDetails="#114" />
<PkgDefPackageRegistration Include="{574fc912-f74f-4b4e-92c3-f695c208a2bb}" Name="VisualBasicPackage" Class="Microsoft.VisualStudio.LanguageServices.VisualBasic.VisualBasicPackage" AllowsBackgroundLoad="true" />
<!-- Cannot load in background until the VisualBasicPackage constructor has no more UI dependencies -->
<PkgDefPackageRegistration Include="{574fc912-f74f-4b4e-92c3-f695c208a2bb}" Name="VisualBasicPackage" Class="Microsoft.VisualStudio.LanguageServices.VisualBasic.VisualBasicPackage" AllowsBackgroundLoad="false" />
<None Include="PackageRegistration.pkgdef" PkgDefEntry="FileContent" />
</ItemGroup>
<ItemGroup Label="Project References">
Expand Down

0 comments on commit ff2ac53

Please sign in to comment.