How do I get intellisense in app.config for a custom section?

前端 未结 2 638
面向向阳花
面向向阳花 2020-12-23 14:03

We have a custom section in my app.config file related to our IoC container class. How can I get intellisense when editing the config file for this section, as well as getti

2条回答
  •  Happy的楠姐
    2020-12-23 14:55

    If you don't want to modify your DotNetConfig.xsd you could add the xsd configuration "inline".

    In your case add the following attributes to the custom section

    
    
             
    

    This is useful while testing an xsd locally because location_of_your_schema could be a local path and when you are ready to production change location_of_your_schema to the public url of the xsd file.

    Note that the xsi:schemaLocation attribute must contain pairs of strings separated by spaces where the first string in each pair is a namespace URI and the second string is the location of a schema.

提交回复
热议问题