Unable to create instance of custom section

Jul 13, 2010 at 12: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?

 

Thanks

 

Mr. Ocelot.

Jul 15, 2010 at 9: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.

 

thanks

 

zafar