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

VisualBasicPackage must be constructed on the main thread #66797

Merged
merged 1 commit into from
Feb 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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