title: .NET nHibernate: resource file not found
body: <p>I can't seem to manage to get my nHibernate test project running, I'm using the following config files and code:</p>
  
  <p>country.hbm.xml marked as embedded resource:</p>
  
  <pre><code>&lt;hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"&gt;
    &lt;class name="SVL.Models.CountryModel, SVL" table="country"&gt;
    &lt;id name="Id" type="int" /&gt;
    &lt;property name="Name" type="String" length="200" /&gt;
   &lt;/class&gt;
  &lt;/hibernate-mapping&gt;
  </code></pre>
  
  <p>My nhibernate config file:</p>
  
  <pre><code>&lt;hibernate-configuration xmlns="urn:nhibernate-configuration-2.2"&gt;
  &lt;session-factory&gt;
  &lt;!-- properties --&gt;
  &lt;property name="connection.provider"&gt;
    NHibernate.Connection.DriverConnectionProvider
  &lt;/property&gt;
  &lt;property name="connection.driver_class"&gt;
    NHibernate.Driver.MySqlDataDriver
  &lt;/property&gt;
  &lt;property name="connection.connection_string"&gt;
    Server=localhost;Database=svl;User ID=root;Password=pfje1008;
  &lt;/property&gt;
  &lt;property name="dialect"&gt;
    NHibernate.Dialect.MySQL5Dialect
  &lt;/property&gt;
  
  &lt;mapping resource="country.hbm.xml" assembly="SVL" /&gt;
  &lt;/session-factory&gt;
  &lt;/hibernate-configuration&gt;`
  </code></pre>
  
  <p>And finally the code that sets up the config of hibernate:</p>
  
  <pre><code>var cfg = new Configuration();
   cfg.Configure();
  
   var sessionFactory = cfg.BuildSessionFactory();
  
   var thisAssembly = typeof(T).Assembly;
   cfg.AddAssembly(thisAssembly);
  </code></pre>
  
  <p>For some reason it keeps telling me the resource file cannot be found...</p>