Mixing .Net 2.0 with .Net 4.0 on ASP.NET

Here is my scenario:

I am currently updating a website that I support from the .Net Framework 3.5 to 4.0. All my assemblies with my code I changed the target structure, they are compiled and the site is working.

Here is my problem / question. I am using Crystal Reports 2010 provided by SAP. Their library is called β€œCrystal Reports for .Net Framework 4.0,” but this library is actually aimed at runtime 2.0 (and what makes me even more egregious is that client controls have 1.1 dependencies ... seriously).

I will run 3.5 (2.0 CLR) and 4.0 (CLR) together because I have to have Crystal Reports, but I want to understand these problems:

  • Performance impact, if any, including this 2.0 build on an ASP.NET 4.0 site (does this require additional overhead? Do you need to download this)?
  • Am I missing something and is there really a CR2010 4.0 build that targets 4.0?
  • If I isolated my shell class outside of my core library business logic, 2.0 would only be loaded / used when it was called (or would the site load the assembly when the website loads into memory forces them to load anyway )? Part of this is my ignorance of how different CLRs load / interact with each other.
+4
source share
1 answer

Since .net 4 and the DLR release, .net installs several versions to work side by side. When v4 receives the pre v4 assembly, it delegates the execution to the pre v4 infrastructure (all pre v4 frameworks are fully compatible with feedback)

  • I suppose there will be a performance hit, however this should be trivial enough to ignore.
  • I do not know:)
  • Infrastructure components are mostly loaded on demand, and they will only be loaded as needed (some when the assembly is loaded, more because JIT compiles different segments of code). In short, most of the v2 code will only be loaded, compiled (in native), and executed only when it is called in your code.
+1
source

Source: https://habr.com/ru/post/1401875/


All Articles