Could not load file or assembly NHibernate.XmlSerializers [closed]

这一生的挚爱 提交于 2020-01-12 12:09:31

问题


I am trying to create a custom membership and role provider. The code for this seems to be fine, but when I try to go to the Security section of the Web Site Administration Tool, I get the following:

The invoked member is not supported in a dynamic assembly.

In reference to the first line of the first bit of NHibernate-related code that is called:

var cfg = new Configuration();

followed by:

A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll

Additional information: Could not load file or assembly 'NHibernate.XmlSerializers, Version=3.1.0.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4' or one of its dependencies. The system cannot find the file specified.

Before that I get a few:

Culture name 'aspx' is not supported.

I have the providers in the App_Code folder and the NHibernate DLLs are copied to the Bin folder on execution of the application.

I am assuming it is to do with the providers not being able to find all of the relevant classes and dlls related to NHibernate and the Role class and so on.


For whatever reason, this problem went away.


回答1:


I had the same thing, turns out it wasn't really a problem. I had IDE set so that it will break on Exceptions

After reading this link below I realised.

http://www.mail-archive.com/nhusers@googlegroups.com/msg06043.html

You can simply hit F5 and continue running. That's pretty much all I know



来源:https://stackoverflow.com/questions/6596784/could-not-load-file-or-assembly-nhibernate-xmlserializers

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!