Skip to content

Commit 5487168

Browse files
committed
Added ComVisible attributes to DialogPage implementations.
1 parent f34299a commit 5487168

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

demo/VSSDK.TestExtension/Options/General.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
using System.Globalization;
55
using Community.VisualStudio.Toolkit;
66
using Microsoft.VisualStudio.Shell;
7+
using System.Runtime.InteropServices;
78

89
namespace TestExtension
910
{
@@ -12,6 +13,7 @@ internal partial class OptionsProvider
1213
// Register the options with these attributes in your package class:
1314
// [ProvideOptionPage(typeof(OptionsProvider.GeneralOptions), "My options", "General", 0, 0, true)]
1415
// [ProvideProfile(typeof(OptionsProvider.GeneralOptions), "My options", "General", 0, 0, true)]
16+
[ComVisible(true)]
1517
public class GeneralOptions : BaseOptionPage<General> { }
1618
}
1719

src/toolkit/Community.VisualStudio.Toolkit.Shared/Options/BaseOptionPage.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
using Microsoft.VisualStudio.Shell;
2-
using Task = System.Threading.Tasks.Task;
1+
using System.Runtime.InteropServices;
2+
using Microsoft.VisualStudio.Shell;
33

44
namespace Community.VisualStudio.Toolkit
55
{
66
/// <summary>
77
/// A base class for a DialogPage to show in Tools -> Options.
88
/// </summary>
9+
[ComVisible(true)]
910
public class BaseOptionPage<T> : DialogPage where T : BaseOptionModel<T>, new()
1011
{
1112
private readonly BaseOptionModel<T> _model;

0 commit comments

Comments
 (0)