NHProfAppender doesn't work with log4net 1.2.11

369 views
Skip to first unread message

cremor

unread,
Nov 11, 2011, 3:19:40 AM11/11/11
to nhprof
Seems like using the profiler with the method that doesn't require
code changes doesn't work with the new log4net 1.2.11. I get the
following errors on startup:

Could not load file or assembly 'log4net, Version=1.2.10.0,
Culture=neutral, PublicKeyToken=1b44e1d426115821' or one of its
dependencies. The located assembly's manifest definition does not
match the assembly reference.
[Some stack traces and logging...]
WRN: Comparing the assembly name resulted in the mismatch: Build
Number
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing
terminated.

I'm using log4net 1.2.11 in my project so I can't just place the
1.2.10 assembly in my bin folder.

You should also note that log4net 1.2.11 is available with two
different strong name keys. I don't know if it's possible to support
both. If not you might prefer the new key since this is the one
log4net recommends.

Fitzchak Yitzchaki

unread,
Nov 11, 2011, 4:46:51 AM11/11/11
to nhp...@googlegroups.com

Can you try putting an assembly redirection statement in the web.config?

--
You received this message because you are subscribed to the Google Groups "nhprof" group.
To post to this group, send email to nhp...@googlegroups.com.
To unsubscribe from this group, send email to nhprof+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/nhprof?hl=en.

cremor

unread,
Nov 11, 2011, 6:11:02 AM11/11/11
to nhprof
Doesn't seem to work, still the same error. Also, how would you
specify the new publicKeyToken? I couldn't find a tag/attribute for
that, only for the new version.

This is the code I tried:

<runtime>
<assemblyBinding>
<dependentAssembly>
<assemblyIdentity name="log4net"
publicKeyToken="1b44e1d426115821"
culture="neutral"/>
<bindingRedirect oldVersion="1.2.10.0"
newVersion="1.2.11.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>


On 11 Nov., 10:46, Fitzchak Yitzchaki <fitzc...@hibernatingrhinos.com>
wrote:

Oren Eini (Ayende Rahien)

unread,
Nov 11, 2011, 7:49:29 AM11/11/11
to nhp...@googlegroups.com
Hm,
We are currently tied to the 1.2.10 version, we will have a fix next week that handles that.

cremor

unread,
Dec 12, 2011, 1:25:43 AM12/12/11
to nhprof
Any update on that?

On Nov 11, 1:49 pm, "Oren Eini (Ayende Rahien)" <aye...@ayende.com>
wrote:

Fitzchak Yitzchaki

unread,
Dec 12, 2011, 2:57:11 AM12/12/11
to nhp...@googlegroups.com, cre...@gmx.net
Thanks for reminding me, an update will be out soon.

Fitzchak Yitzchaki

unread,
Dec 12, 2011, 4:52:48 AM12/12/11
to nhp...@googlegroups.com, cre...@gmx.net
A new build was published. Can you please test it?

cremor

unread,
Dec 12, 2011, 6:17:37 AM12/12/11
to nhprof
I'm still getting the same error with build 919.
Using the .NET Reflector I can see that the NHibernateLog4Net assembly
is still referencing log4net 1.2.10.

On Dec 12, 10:52 am, Fitzchak Yitzchaki

Fitzchak Yitzchaki

unread,
Dec 12, 2011, 6:45:23 AM12/12/11
to nhp...@googlegroups.com, cre...@gmx.net
If you're using the NHibernateProfiler.Initialize() method, it'll dynamically generate an assembly that will reference the log4net version that in use in your project.
If you're using NHProf through the configuration file, so yes. The NHibernateLog4Net assembly has a reference to log4net 1.2.10.

cremor

unread,
Dec 12, 2011, 7:35:38 AM12/12/11
to nhprof
Using NHibernateProfiler.Initialize() already worked in previous
versions.
This thread is only about the app.config method that doesn't require
code changes (as I wrote in the first post).

On Dec 12, 12:45 pm, Fitzchak Yitzchaki

Fitzchak Yitzchaki

unread,
Dec 12, 2011, 7:56:05 AM12/12/11
to nhp...@googlegroups.com
I'll send you a custom NHibernateLog4Net version that use the log4net 1.2.11 by email.

Siim

unread,
Jan 20, 2012, 9:36:15 AM1/20/12
to nhprof
I'm having the exact same problem with NHibernateLog4Net.
Can you send me also a custom version of NHibernateLog4Net?


On Dec 12 2011, 2:56 pm, Fitzchak Yitzchaki

Fitzchak Yitzchaki

unread,
Jan 25, 2012, 7:21:45 AM1/25/12
to nhp...@googlegroups.com
Yes

Cường Bùi Minh

unread,
Mar 26, 2012, 6:16:36 AM3/26/12
to nhp...@googlegroups.com
I also have the same problem. Can you send me also a custom version of NHibernateLog4Net?
Yes


> > > > > >> > > For more options, visit this group at
> > > > > >> > >http://groups.google.com/​group/nhprof?hl=en.
>
> > > > > >> --
> > > > > >> You received this message because you are subscribed to the Google
> > > > Groups
> > > > > >> "nhprof" group.
> > > > > >> To post to this group, send email to nhp...@googlegroups.com.
> > > > > >> To unsubscribe from this group, send email to

> > > > > >> For more options, visit this group at
> > > > > >>http://groups.google.com/​group/nhprof?hl=en.
>
> > > > --
> > > > You received this message because you are subscribed to the Google
> > Groups
> > > > "nhprof" group.
> > > > To post to this group, send email to nhp...@googlegroups.com.
> > > > To unsubscribe from this group, send email to

> > > > For more options, visit this group at
> > > >http://groups.google.com/​group/nhprof?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "nhprof" group.
> > To post to this group, send email to nhp...@googlegroups.com.
> > To unsubscribe from this group, send email to

> > For more options, visit this group at
> >http://groups.google.com/​group/nhprof?hl=en.

--
You received this message because you are subscribed to the Google Groups "nhprof" group.
To post to this group, send email to nhp...@googlegroups.com.
To unsubscribe from this group, send email to nhprof+unsubscribe@​googlegroups.com.
Yes


> > > > > >> > > For more options, visit this group at
> > > > > >> > >http://groups.google.com/​group/nhprof?hl=en.
>
> > > > > >> --
> > > > > >> You received this message because you are subscribed to the Google
> > > > Groups
> > > > > >> "nhprof" group.
> > > > > >> To post to this group, send email to nhp...@googlegroups.com.
> > > > > >> To unsubscribe from this group, send email to

> > > > > >> For more options, visit this group at
> > > > > >>http://groups.google.com/​group/nhprof?hl=en.
>
> > > > --
> > > > You received this message because you are subscribed to the Google
> > Groups
> > > > "nhprof" group.
> > > > To post to this group, send email to nhp...@googlegroups.com.
> > > > To unsubscribe from this group, send email to

> > > > For more options, visit this group at
> > > >http://groups.google.com/​group/nhprof?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "nhprof" group.
> > To post to this group, send email to nhp...@googlegroups.com.
> > To unsubscribe from this group, send email to

> > For more options, visit this group at
> >http://groups.google.com/​group/nhprof?hl=en.

--
You received this message because you are subscribed to the Google Groups "nhprof" group.
To post to this group, send email to nhp...@googlegroups.com.
To unsubscribe from this group, send email to nhprof+unsubscribe@​googlegroups.com.

Fitzchak Yitzchaki

unread,
Mar 26, 2012, 6:28:25 AM3/26/12
to nhp...@googlegroups.com
Yes, sent

To view this discussion on the web visit https://groups.google.com/d/msg/nhprof/-/04P7gSJp8J4J.

To post to this group, send email to nhp...@googlegroups.com.
To unsubscribe from this group, send email to nhprof+un...@googlegroups.com.

Geoffrey Braaf

unread,
May 8, 2012, 3:26:52 AM5/8/12
to nhprof
Would it be possible for you to send me the custom compiled versions
as well? I have the exact same issue, while using the latest build of
nhprof.

Thanx!

Ciao,
Geoffrey

On Mar 26, 12:28 pm, Fitzchak Yitzchaki
<fitzc...@hibernatingrhinos.com> wrote:
> Yes, sent
>
> On Mon, Mar 26, 2012 at 12:16 PM, Cường Bùi Minh <denzzo2...@gmail.com>wrote:
>
>
>
> > I also have the same problem. Can you send me also a custom version of
> > NHibernateLog4Net?
>
> > On Wednesday, 25 January 2012 19:21:45 UTC+7, Fitzchak Yitzchaki wrote:
>
> >> Yes
>
> >>> > > > > > >> > > nhprof+unsubscribe@​googlegroups.com<nhprof%2Bunsu...@googlegroups.com>
> >>> .
> >>> > > > > > >> > > For more options, visit this group at
> >>> > > > > > >> > >http://groups.google.com/​group/nhprof?hl=en<http://groups.google.com/group/nhprof?hl=en>
> >>> .
>
> >>> > > > > > >> --
> >>> > > > > > >> You received this message because you are subscribed to the
> >>> Google
> >>> > > > > Groups
> >>> > > > > > >> "nhprof" group.
> >>> > > > > > >> To post to this group, send email to
> >>> nhp...@googlegroups.com.
> >>> > > > > > >> To unsubscribe from this group, send email to
> >>> > > > > > >> nhprof+unsubscribe@​googlegroups.com<nhprof%2Bunsu...@googlegroups.com>
> >>> .
> >>> > > > > > >> For more options, visit this group at
> >>> > > > > > >>http://groups.google.com/​group/nhprof?hl=en<http://groups.google.com/group/nhprof?hl=en>
> >>> .
>
> >>> > > > > --
> >>> > > > > You received this message because you are subscribed to the
> >>> Google
> >>> > > Groups
> >>> > > > > "nhprof" group.
> >>> > > > > To post to this group, send email to nhp...@googlegroups.com.
> >>> > > > > To unsubscribe from this group, send email to
> >>> > > > > nhprof+unsubscribe@​googlegroups.com<nhprof%2Bunsu...@googlegroups.com>
> >>> .
> >>> > > > > For more options, visit this group at
> >>> > > > >http://groups.google.com/​group/nhprof?hl=en<http://groups.google.com/group/nhprof?hl=en>
> >>> .
>
> >>> > > --
> >>> > > You received this message because you are subscribed to the Google
> >>> Groups
> >>> > > "nhprof" group.
> >>> > > To post to this group, send email to nhp...@googlegroups.com.
> >>> > > To unsubscribe from this group, send email to
> >>> > > nhprof+unsubscribe@​googlegroups.com<nhprof%2Bunsu...@googlegroups.com>
> >>> .
> >>> > > For more options, visit this group at
> >>> > >http://groups.google.com/​group/nhprof?hl=en<http://groups.google.com/group/nhprof?hl=en>
> >>> .
>
> >>> --
> >>> You received this message because you are subscribed to the Google
> >>> Groups "nhprof" group.
> >>> To post to this group, send email to nhp...@googlegroups.com.
> >>> To unsubscribe from this group, send email to
> >>> nhprof+unsubscribe@​googlegroups.com<nhprof%2Bunsu...@googlegroups.com>
> >>> .
> >>> For more options, visit this group at
> >>>http://groups.google.com/​group/nhprof?hl=en<http://groups.google.com/group/nhprof?hl=en>
> >>> .
>
> > On Wednesday, 25 January 2012 19:21:45 UTC+7, Fitzchak Yitzchaki wrote:
>
> >> Yes
>
> ...
>
> read more »

Fitzchak Yitzchaki

unread,
May 8, 2012, 3:45:16 AM5/8/12
to nhp...@googlegroups.com
Sent

To unsubscribe from this group, send email to nhprof+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/nhprof?hl=en.


Dewy

unread,
May 14, 2012, 3:54:26 AM5/14/12
to nhprof
Can I also get a copy as a matter of urgency please?

On May 8, 8:45 am, Fitzchak Yitzchaki <fitzc...@hibernatingrhinos.com>
wrote:
> ...
>
> read more »

Fitzchak Yitzchaki

unread,
May 14, 2012, 4:07:52 AM5/14/12
to nhp...@googlegroups.com
Yes

To unsubscribe from this group, send email to nhprof+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/nhprof?hl=en.


Steven Scheffler

unread,
May 18, 2012, 4:08:11 PM5/18/12
to nhprof
I'm trying to work with nhprof on a project which is using the 1.2.11
version of log4net and getting the same errors as above. We're trying
to use the log appender option of nhprof to avoid having to change
source on our app to enable/disable profiling.

Can you please send me a version of the NHibernateLog4Net assembly
which uses the newer log4net as you did for others above?

Thanks!

On May 14, 3:07 am, Fitzchak Yitzchaki
> ...
>
> read more »

Fitzchak Yitzchaki

unread,
May 20, 2012, 4:45:51 AM5/20/12
to nhp...@googlegroups.com, st...@scheffler.us
Yes, attached it here for anyone interested.
Please note that this is built with an old version of the appender, which may not be updated with a future version of NHProf.
We do plan to add support for this version of log4net in the downloadable build soon.

To unsubscribe from this group, send email to nhprof+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/nhprof?hl=en.


HibernatingRhinos.Profiler.Appender.NHibernateLog4Net.dll
Reply all
Reply to author
Forward
0 new messages