Skip to content

How to remove NHibernate.ByteCode.Linfu

June 25, 2012

last week, I couldn’t find a way to remove this dependency of the dll NHibernate.ByteCode.Linfu for NHibernate, and according to previous experience this dll is not really needed, yet NHiberante always seemd to look for this code base. The reason why I wanted to remove this is that it can reduce the need for the dependency of this dll aswell as lookup on the project startup, and for tsting purposes aswell. Finally I have found a way to remove it.

Here is how to remove it, comment in the web.config file.

        <add key=”dialect” value=”NHibernate.Dialect.MsSql2000Dialect”/>
    <!–<add key=”proxyfactory.factory_class” value=”NHibernate.ByteCode.LinFu.ProxyFactoryFactory, NHibernate.ByteCode.LinFu” />–>
        <add key=”connection.provider” value=”NHibernate.Connection.DriverConnectionProvider”/>

    <add key=”connection.connection_string” value=”Data Source=yourcomputername;Initial Catalog=yourdatabasename;User ID=userr; Password=”userpassword” />
    <add key=”connection.driver_class” value=”NHibernate.Driver.SqlClientDriver”/>
        <add key=”current_session_context_class” value=”web”/>

Remove the references to the dll usually in the References folder by right clicking the  NHibernate.ByteCode.Linfu.dll in the References folder in main directory. Click Delete.

This should remove all other dependencies in the other projects if you created them.

There you have it, no need for NHibernate to always look up this dll.


From → Uncategorized

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: