Does using assembly compiled in older version of .NET framework affects whole performance?

前端 未结 2 1859
孤独总比滥情好
孤独总比滥情好 2020-12-29 13:40

Lets imagine that we have two assemblies:

  1. Foo.Logic (compiled on .NET 2.0 framework)
  2. Foo.Application (compiled on .NET 4.0 framework) that have refere
2条回答
  •  独厮守ぢ
    2020-12-29 14:02

    Unless you use explicitly use SxS, your .NET 2 assembly will be loaded into the .NET 4 CLR. There shouldn't be any performance problems at all... the code which originally targeted .NET 2 will just run using the .NET 4 libraries and CLR, etc. And yes, you can use an assembly compiled with .NET 1.1 in a .NET 2 or higher app, too.

    There is a problem if you try to load a mixed-mode assembly (some native code, some IL) in .NET 4, IIRC... but if it's "just" a .NET class library, you should be fine.

提交回复
热议问题