This project has moved and is read-only. For the latest updates, please go here.

Unable to create instance of custom section

Jul 13, 2010 at 1:30 PM

Hi All,

After managing to get the custom tool to chrun out all the files i need and adding all the necessary references i am finding that i am unable to get a handle on an instance of the custom section i have just created.

check list;

  • I have imported the project correctly to use the generated .cs file.
  • I have placed a .config file which conforms to the schema i have designed in the root folder of the code and the exe output fold

is there anything else i am missing?


the line of code i am calling to get the handle is;

ScriptShareConfigurationSection ssConfig = ScriptShareConfigurationSection.Instance; // ScriptShareConfigurationSection is the custom section i created.

but this line; ScriptShareConfigurationSection.Instance, returns null.


any ideas?




Mr. Ocelot.

Jul 15, 2010 at 10:05 AM

the problem was in the config file, it was not generated properly, the element which contains the definition for the custom section did not include a reference to the assembly which defines the custom section programmatically.