diff --git a/src/AddIns/Misc/PackageManagement/Project/Src/VisualStudio/ThreadHelper.cs b/src/AddIns/Misc/PackageManagement/Project/Src/VisualStudio/ThreadHelper.cs index d3e601d0fc..30b7d75836 100644 --- a/src/AddIns/Misc/PackageManagement/Project/Src/VisualStudio/ThreadHelper.cs +++ b/src/AddIns/Misc/PackageManagement/Project/Src/VisualStudio/ThreadHelper.cs @@ -2,6 +2,7 @@ // This code is distributed under the GNU LGPL (for details please see \doc\license.txt) using System; +using ICSharpCode.SharpDevelop.Gui; namespace Microsoft.VisualStudio.Shell { @@ -19,7 +20,7 @@ namespace Microsoft.VisualStudio.Shell public T Invoke(Func method) { - return method(); + return WorkbenchSingleton.SafeThreadFunction(method); } } }