Visual Studio Development Bookmark and Share   
 index > Visual Studio Extensibility > what is the service that a service provider should have in order to support option page
 

what is the service that a service provider should have in order to support option page

Hi,

I have a package, which calls Package.GetDialogPage to get a value from Tools/Options during the Package.Initialize(). It works fine. However, it fails in the following unit test code.

// Create a basic service provider
OleServiceProvider serviceProvider = OleServiceProvider.CreateOleServiceProviderWithBasicServices();
// Site the package
Assert.AreEqual(0, package.SetSite(serviceProvider), "SetSite did not return S_OK");

So what is the service that I'll need to add to the basic service provider?



Regards,
Haibin
haibin_sh  Tuesday, November 06, 2007 5:10 AM
I ran into the exact same issue. I debugged and saw LoadSettingsFromStorage of the dialog page fails because Package's UserRegistryRoot property is null during the mock run. Any thoughts on how to workaround this problem?
Priyadarshini Gorur  Tuesday, October 13, 2009 9:53 AM

You can use google to search for other answers

Custom Search

More Threads

• Manipulate solution file contents without opening them
• How to integrate custom DSL with Class Designer?
• javascript vs shell 2008 outlining (expand collapse for function statement etc...)
• How to programmatically change the Publish properties?
• Setting properties of a control in the form designer
• Unable to install VS SDK
• DSL Tool: how NOT to register your assemblies in the GAC
• Enterprise Library
• Enable lines in the Solution Explorer window in VSTA/Visual Basic
• Creating editor in toolwindow without scrollbars