The Web Application compiles and run fine when I don't go through the Web Deployment Project. However when I try to use that, I get the following error:
<div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste">Error1An error occurred creating the configuration section handler for hibernate-configuration: Could not load file or assembly 'NHibernate' or one of its dependencies. The system cannot find the file specified. (F:\Folke\Folke.csproj_deploy\Release\web.config
line 4)1
1Folke.csproj_deploy</div> <div></div>
"An error occurred creating the configuration section handler for hibernate-configuration: Could not load file or assembly 'NHibernate' or one of its dependencies. The system cannot find the file specified. (F:\Folke\Folke.csproj_deploy\Release\web.config
line 4)"
<div>I'm not quite sure why Visual Studio would complain about that. The assemblies should be fine, since I can run the Web Application just fine if I compile it outside of the Web Deployment Project. Any suggestion would be appreciated!</div>
Chtar
Member
3 Points
21 Posts
Could not load file or assembly - Web Deployment Project
Aug 08, 2010 09:39 AM|LINK
Hi,
I have the following projects in a solution :
- A Web Application
- A Class Library
- A Web Deployment project
The Web Application compiles and run fine when I don't go through the Web Deployment Project. However when I try to use that, I get the following error:
<div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste">Error 1 An error occurred creating the configuration section handler for hibernate-configuration: Could not load file or assembly 'NHibernate' or one of its dependencies. The system cannot find the file specified. (F:\Folke\Folke.csproj_deploy\Release\web.config line 4) 1 1 Folke.csproj_deploy</div> <div></div>"An error occurred creating the configuration section handler for hibernate-configuration: Could not load file or assembly 'NHibernate' or one of its dependencies. The system cannot find the file specified. (F:\Folke\Folke.csproj_deploy\Release\web.config line 4)"
This is the beginning of my Web.config:
<div>I'm not quite sure why Visual Studio would complain about that. The assemblies should be fine, since I can run the Web Application just fine if I compile it outside of the Web Deployment Project. Any suggestion would be appreciated!</div>XiaoCheng Fa...
All-Star
17743 Points
1414 Posts
Re: Could not load file or assembly - Web Deployment Project
Aug 10, 2010 02:58 AM|LINK
Hi,
Web deloyment project will do a more strict check for all resources of the project, and you can try follow lines for NHibernate:
<configSections> <section name="nhibernate" type="System.Configuration.NameValueSectionHandler, System, Version=1.0.5000.0,Culture=neutral, PublicKeyToken=b77a5c561934e089" /> </configSections>I hope this can be helpful for you.
If you have any feedback about my replies, please contact msdnmg@microsoft.com
Microsoft One Code Framework
Chtar
Member
3 Points
21 Posts
Re: Could not load file or assembly - Web Deployment Project
Aug 10, 2010 06:02 AM|LINK
Hi,
I added the line you mentionned in the configuration, but the result remain identical. Here's the updated config: