none
Mixing Assembly Runtime Versions Question RRS feed

  • Question

  • I'm building an application targeted at the .NET Framework 4 and want to use the Logging Application Block and notice that the 5.0.414.0 version installed by the MSI is targeted at the 2.0.50727 runtime.  If this 2.0 version of the Logging Application Block is used, are there any performance problems or other issues which would suggest that I install the Logging Application Block source code and compile it targeted at .NET Framework 4 and use that DLL??

    TIA,

    George

     

    Wednesday, September 22, 2010 1:04 AM

Answers

  • My answer it's based on my personal experience: I think you should recompile the Enterprise Library using a new target framework (4.0).

    I noticed a slowdown in some of my applications when mixing assemblies from different framework versions, specially on Winforms projects.

    Good Luck

    • Marked as answer by SamAgain Tuesday, October 5, 2010 11:44 PM
    Tuesday, October 5, 2010 4:09 PM

All replies

  • Hi,

    So the question is basically about the performance differences between CLR 4.0 and CLR 2.0. Please take a look the following benchmark result, it could help you make a decision.

    C# Performance Benchmark (.NET 3.5 SP1 Versus .NET 4.0)  (.NET 3.5 uses the CLR 2.0)

     


    Please mark the right answer at the right time.
    Thanks,
    Sam
    Wednesday, September 22, 2010 7:58 AM
  • Hi Sam,

    Thanks for your reply but no, that isn't what I was looking for.  Sorry, I wasn't so clear.  Let me rephrase...

    Since the source code to the Enterprise Library is provided and since the DLLs provided are version 2.0.50727, should I compile the sources targeted to .NET 4.0 for optimal performance from within my 4.0 application?

    -- or, put another way --

    If I use the supplied 2.0.50727 DLL, will it run inside the same App Domain as my 4.0 targetted application therefore be running in a 4.0 runtime anyway?

    Thanks again in advance,

    George

    Friday, September 24, 2010 6:02 PM
  • My answer it's based on my personal experience: I think you should recompile the Enterprise Library using a new target framework (4.0).

    I noticed a slowdown in some of my applications when mixing assemblies from different framework versions, specially on Winforms projects.

    Good Luck

    • Marked as answer by SamAgain Tuesday, October 5, 2010 11:44 PM
    Tuesday, October 5, 2010 4:09 PM
  • Hi,

    I would suggest recompiling it with .NET 4.0. If there's any problems during the compilation, the 2.0 version could still be used inside .NET 4.0 since .NET 4.0 is backward compatible. I am not quite sure if there's any performance issue, but it could be tested out. BTW, I would suggest consulting the Entity Framework Discussion Group.


    Please mark the right answer at the right time.
    Thanks,
    Sam
    Tuesday, October 5, 2010 5:16 PM
  • Thanks Sam and Christiano... I'll give that a go and report back if there are any problems.
    Wednesday, October 6, 2010 12:08 AM