Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I include a web.config custom section schema without having to update each dev machine?

I've added a new custom section to the web.config of an application.

I have also created a corresponding schema file for the new section definition.

How do I include the schema reference in the web.config so that any developer editing the section has intellisense enabled when dealing with my new custom config section?

I've seen solutions whereby I include the schema reference within the web.config by having to update the [IDE installation directory]\Packages\schemas\xml location? This works but I want to ensure that any new developer checking out the code on a fresh development machine automatically has the intellisense enabled without having to also update their development machine.

like image 238
Brian Scott Avatar asked May 27 '10 15:05

Brian Scott


1 Answers

Add your .xsd file as a solution item (or project item). Visual Studio will automatically use any schema file it finds in a solution. You may have to restart Visual Studio for it to start working.

You will also need to reference the schema in the section element:

<mySection xmlns:name-of-schema>
...
</mySection>
like image 136
Carl Raymond Avatar answered Sep 22 '22 17:09

Carl Raymond