Windows Develop Bookmark and Share   
 index > Windows Forms Designer > Form designer throwing a configuration error
 

Form designer throwing a configuration error

Hi All,

I'm getting this weird error while i'm trying to load the designer for my main form which says the cachingConfiguration section is missing in provided configuration file even though my main app.config contains the caching block section in it. I'm unable to find any results on this particluar error. The configuration block is called in a Singleton class which is invoked in the Form Load event. There is only one configuration file for the entire solution. Has anybody encountered this error. Please help.
Narotham Kalluri  Saturday, August 29, 2009 9:05 AM

Hi Narotham,

Based on my understanding, there might be some errors in the configuration file. You can check the configuration block to see if thereare some errors. You can also remove the configuration block and use the Enterprise Tool to add the configuration block again.

To have the designer shown correctly without caring whether the code about the configuration is correct or not, we can check the DesignMode property and run the code only in non design mode. This is a code snippet:

        private void Form1_Load(object sender, EventArgs e)
        {
            if (!DesignMode)
            {
                //Do something with the configuration here, it would not affect the designer.
            }
        }

Please let me know if this does not help.
Aland Li


Please mark the replies as answers if they help and unmark if they don't. This can be beneficial to other community members reading the thread.
Aland Li  Monday, August 31, 2009 12:56 PM
Hi All,

I'm getting this weird error while i'm trying to load the designer for my main form which says the cachingConfiguration section is missing in provided configuration file even though my main app.config contains the caching block section in it. I'm unable to find any results on this particluar error. The configuration block is called in a Singleton class which is invoked in the Form Load event. There is only one configuration file for the entire solution. Has anybody encountered this error. Please help.

here is the actual stack trace attached to the error thrown in designer

at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.EnterpriseLibraryFactory.BuildUp[T](IReadWriteLocator locator, ILifetimeContainer lifetimeContainer, String id, IConfigurationSource configurationSource)
at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.LocatorNameTypeFactoryBase`1.Create(String name)
at Microsoft.Practices.EnterpriseLibrary.Caching.CacheFactory.GetCacheManager(String cacheManagerName)
at VAM.iFoundry.Workbench.WorkbenchData..ctor() in <SingletonFile>.cs:line 22
Narotham Kalluri  Saturday, August 29, 2009 9:07 AM

Hi Narotham,

Based on my understanding, there might be some errors in the configuration file. You can check the configuration block to see if thereare some errors. You can also remove the configuration block and use the Enterprise Tool to add the configuration block again.

To have the designer shown correctly without caring whether the code about the configuration is correct or not, we can check the DesignMode property and run the code only in non design mode. This is a code snippet:

        private void Form1_Load(object sender, EventArgs e)
        {
            if (!DesignMode)
            {
                //Do something with the configuration here, it would not affect the designer.
            }
        }

Please let me know if this does not help.
Aland Li


Please mark the replies as answers if they help and unmark if they don't. This can be beneficial to other community members reading the thread.
Aland Li  Monday, August 31, 2009 12:56 PM

You can use google to search for other answers

Custom Search

More Threads

• How to Dock a control in a custom ContainerControl without hiding its custom draw caption at the top?
• Displaying DataGridViewColumn-derived classes in the ColumnType property of the Edit Columns dialog box
• Referenced Project controls not in Toolbox?
• Can you get to the open project or solution files while in a Designer in Design mode
• What service does the datagrid use to create tablestyles
• Showing Designer verbs at Run time
• VS 2008 Designer not executing default constructor anymore?
• DataGridView, CheckBox fields and Strongly Typed datasets....
• BindingSource designer databinding
• cross table