diff --git a/build/packages.targets b/build/packages.targets index 61b2c47817a..d8c79c8fb74 100644 --- a/build/packages.targets +++ b/build/packages.targets @@ -5,7 +5,7 @@ 3.0.0 4.5.0 4.3.0 - 17.1.0-preview-2-31918-073 + 17.2.0-preview-2-32304-091 16.153.0 5.0.0 2.14.0-rtm-832 diff --git a/src/NuGet.Clients/NuGet.PackageManagement.UI/NuGet.PackageManagement.UI.csproj b/src/NuGet.Clients/NuGet.PackageManagement.UI/NuGet.PackageManagement.UI.csproj index 00432d89027..92a27e78600 100644 --- a/src/NuGet.Clients/NuGet.PackageManagement.UI/NuGet.PackageManagement.UI.csproj +++ b/src/NuGet.Clients/NuGet.PackageManagement.UI/NuGet.PackageManagement.UI.csproj @@ -217,7 +217,6 @@ Resources.resx - diff --git a/src/NuGet.Clients/NuGet.PackageManagement.UI/Options/PackageSourceCheckedListBox.cs b/src/NuGet.Clients/NuGet.PackageManagement.UI/Options/PackageSourceCheckedListBox.cs index 3ed875d0ea5..82e0f17d23b 100644 --- a/src/NuGet.Clients/NuGet.PackageManagement.UI/Options/PackageSourceCheckedListBox.cs +++ b/src/NuGet.Clients/NuGet.PackageManagement.UI/Options/PackageSourceCheckedListBox.cs @@ -13,6 +13,7 @@ using NuGet.VisualStudio.Internal.Contracts; using GelUtilities = Microsoft.Internal.VisualStudio.PlatformUI.Utilities; using NuGet.Configuration; +using Microsoft.VisualStudio.Shell; namespace NuGet.Options { @@ -24,6 +25,8 @@ internal class PackageSourceCheckedListBox : CheckedListBox private Icon GetWarningIcon() { + ThreadHelper.ThrowIfNotOnUIThread(); + if (WarningIcon == null) { ImageAttributes attributes = new ImageAttributes @@ -66,6 +69,8 @@ public override int ItemHeight protected override void OnDrawItem(DrawItemEventArgs e) { + ThreadHelper.ThrowIfNotOnUIThread(); + var currentListBox = this; var graphics = e.Graphics; e.DrawBackground(); diff --git a/src/NuGet.Clients/NuGet.PackageManagement.UI/Options/PackageSourcesOptionsControl.cs b/src/NuGet.Clients/NuGet.PackageManagement.UI/Options/PackageSourcesOptionsControl.cs index 2ff713f6353..7502c7dd501 100644 --- a/src/NuGet.Clients/NuGet.PackageManagement.UI/Options/PackageSourcesOptionsControl.cs +++ b/src/NuGet.Clients/NuGet.PackageManagement.UI/Options/PackageSourcesOptionsControl.cs @@ -54,6 +54,7 @@ private static IVsImageService2 ImageService { get { + ThreadHelper.ThrowIfNotOnUIThread(); return (IVsImageService2)Package.GetGlobalService(typeof(SVsImageService)); } } @@ -62,6 +63,8 @@ public static Image WarningIcon { get { + ThreadHelper.ThrowIfNotOnUIThread(); + ImageAttributes attributes = new ImageAttributes { StructSize = Marshal.SizeOf(typeof(ImageAttributes)), @@ -80,6 +83,8 @@ public static Image WarningIcon public PackageSourcesOptionsControl(IAsyncServiceProvider asyncServiceProvider) { + ThreadHelper.ThrowIfNotOnUIThread(); + InitializeComponent(); _asyncServiceProvider = asyncServiceProvider; diff --git a/src/NuGet.Clients/NuGet.PackageManagement.UI/Resources/Resources.xaml b/src/NuGet.Clients/NuGet.PackageManagement.UI/Resources/Resources.xaml index 6d7bfa79225..8e3a243c7c8 100644 --- a/src/NuGet.Clients/NuGet.PackageManagement.UI/Resources/Resources.xaml +++ b/src/NuGet.Clients/NuGet.PackageManagement.UI/Resources/Resources.xaml @@ -165,17 +165,17 @@ - - - - -