Rui Jarimba
Rui Jarimba

Reputation: 18084

Disable web.config schema validation

I was wondering if there is a way to disable the schema validation of the web.config file when building the solution? I am using Visual Studio 2013. I see a lot of messages like the following, which are a bit annoying:

...
Could not find schema information for the element 'loggingConfiguration'
Could not find schema information for the attribute 'name'
Could not find schema information for the attribute 'tracingEnabled'
Could not find schema information for the attribute 'defaultCategory'
...

Web.config schema messages

I know it is possible to suppress specific warnings, I was wondering if there is something similar for these kind of messages?

Upvotes: 2

Views: 1280

Answers (1)

Leo Liu
Leo Liu

Reputation: 76860

I was wondering if there is something similar for these kind of messages?

These are the messages from Visual Studio. They mean that the IDE cannot find schemas for our sections, so the Intellisense will not work with them.

In general, these messages do not affect the control's functionality, so you can just ignore them. If there are strict requirements to remove all warnings and messages in VS, you can follow below steps:

  1. In Visual Studio, open your web.config file.
  2. Double click web.config, go to the "XML" menu and select "Create Schema". This action should create a new file called or "web.xsd".
  3. Save the schema in an apropriate place(for example,the root of the project).
  4. Go back to your web.config and double click it, see the "Properties" tab of the web.config file where there is a property named Schemas. Make sure the xsd you just generated is referenced in the Schemas property. If it's not there then add it.

If you need further assistance, please reactivate this ticket: How to fix Error: “Could not find schema information for the attribute/element” by creating schema

Upvotes: 1

Related Questions