Hi,
I am trying to implement the custom tool option page.
http://blogs.msdn.com/jim_glass/archive/2005/02/14/372319.aspx
I am working on tool option page.I created a custom page in the tool option successfully.Now I am trying to use the settings from my custom page to some other package.When i am running this code is giving me " Specified Cast is not Vaild " . I am not able to figure it out why its happening.One more thing when I am trying with
EnvDTE.Properties props = dte.get_Properties("Environment", "Documents");
Its working fine.
But ..
The Code is
private void MenuItemCallback(object sender, EventArgs e)
{
DTE dte = (EnvDTE.DTE)GetService(typeof(DTE)) as DTE;
if (dte != null)
{
EnvDTE.Properties props = dte.get_Properties("Environment", "Documents");
MessageBox.Show("OptionInteger: " + props.Count.ToString());
EnvDTE.Properties props1 = dte.get_Properties("My Options Page (C#)", "General");\\Getting Error
}
}
I am trying to implement the custom tool option page.
http://blogs.msdn.com/jim_glass/archive/2005/02/14/372319.aspx
I am working on tool option page.I created a custom page in the tool option successfully.Now I am trying to use the settings from my custom page to some other package.When i am running this code is giving me " Specified Cast is not Vaild " . I am not able to figure it out why its happening.One more thing when I am trying with
EnvDTE.Properties props = dte.get_Properties("Environment", "Documents");
Its working fine.
But ..
EnvDTE.Properties props1 = dte.get_Properties("My Options Page (C#)", "General");
is not working.The Code is
private void MenuItemCallback(object sender, EventArgs e)
{
DTE dte = (EnvDTE.DTE)GetService(typeof(DTE)) as DTE;
if (dte != null)
{
EnvDTE.Properties props = dte.get_Properties("Environment", "Documents");
MessageBox.Show("OptionInteger: " + props.Count.ToString());
EnvDTE.Properties props1 = dte.get_Properties("My Options Page (C#)", "General");\\Getting Error
}
}