Reputation: 13
I started a asp.net mvc Project and I am trying to use nibernate for db Access.
I get the following warings in visual studio:
Could not find schema information for the element 'urn:nhibernate-configuration-2.2:hibernate-configuration'.
Could not find schema information for the element 'urn:nhibernate-configuration-2.2:session-factory'.
Could not find schema information for the element 'urn:nhibernate-configuration-2.2:property'.
Could not find schema information for the attribute 'name'.
Could not find schema information for the element 'urn:nhibernate-configuration-2.2:property'.
Could not find schema information for the attribute 'name'.
Could not find schema information for the element 'urn:nhibernate-configuration-2.2:property'.
Could not find schema information for the attribute 'name'.
My Web.conf:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="hibernate-configuration" type="NHibernate.Cfg.ConfigurationSectionHandler, NHibernate" />
</configSections>
....
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
<session-factory>
<property name="dialect">NHibernate.Dialect.MySQLDialect</property>
<property name="connection.driver_class">NHibernate.Driver.MySqlDataDriver</property>
<property name="connection.connection_string_name">MainDb</property>
</session-factory>
</hibernate-configuration>
...
I installed nhibernate via nuget.
Any ideas? Thanks in advance.
Upvotes: 1
Views: 1678
Reputation: 13410
Usually you can simply ignore that.
But if you want, you can add the schema to your xml validation in visual studio. XML Menu > Schemas > Add
Pick nhibernate-configuration.xsd from your packages folder
packages\NHibernate\lib\<.NetVersion>
Now VS should be able to validate your xml (web.config) correctly.
Upvotes: 5