none
Mixing .NET assembly versions? RRS feed

  • Question

  • Hello,

    I've seen some questions along these lines in the past but I'm still a little confused: If I distribute a "pure" .NET assembly built against version 4 of the framework, and someone references it in their project but then builds their project against version 4.5 of the framework, how is this resolved? Will the entire project (my assembly + their consuming app) run on top of version 4.5 and benefit from the performance improvements? Thanks in advance.

    -L

    Tuesday, June 12, 2012 3:18 PM

Answers

  • In general, any time you reference an assembly using an older .NET version from a .NET project, the new runtime will get used.  This pretty much means that anybody who installs .NET 4.5 will get instant performance boosts from all of the improvements in .NET 4.5 for all .NET 4 applications.

    (Note that it is possible, via something like COM, to have side by side execution of .NET 3.5sp1 [CLR2] and .NET 4/4.5 [CLR4] assemblies, each running in their own runtime.)


    Reed Copsey, Jr. - http://reedcopsey.com
    If a post answers your question, please click "Mark As Answer" on that post and "Mark as Helpful".

    • Marked as answer by LKeene Tuesday, June 12, 2012 5:03 PM
    Tuesday, June 12, 2012 4:34 PM
    Moderator

All replies

  • Yes.

    Tuesday, June 12, 2012 3:25 PM
  • In general, any time you reference an assembly using an older .NET version from a .NET project, the new runtime will get used.  This pretty much means that anybody who installs .NET 4.5 will get instant performance boosts from all of the improvements in .NET 4.5 for all .NET 4 applications.

    (Note that it is possible, via something like COM, to have side by side execution of .NET 3.5sp1 [CLR2] and .NET 4/4.5 [CLR4] assemblies, each running in their own runtime.)


    Reed Copsey, Jr. - http://reedcopsey.com
    If a post answers your question, please click "Mark As Answer" on that post and "Mark as Helpful".

    • Marked as answer by LKeene Tuesday, June 12, 2012 5:03 PM
    Tuesday, June 12, 2012 4:34 PM
    Moderator