Question

If I build an IE Add-On on top of the .NET Framework 4.0, can it be used at the same time with other Add-Ons targeting different .NET Framework Versions (i.e. 2.0)?

Also, should I care about different versions of IE about this subject?

Thank you very much.

Était-ce utile?

La solution

I believe the iexplorer.exe process will automatically run all hosted .NET assemblies through the newest version of the CLR / .NET framework on the client PC, regardless of what .NET version was targeted when the assemblies were compiled.

** EDIT **

Looks like that was pre-4.0.

Add-on’s to Internet Explorer are called Browser Helper Objects, often documented as BHOs as well. They are COM types, thus if we were going to do this managed, we will be doing some COM Interop. I’ve done this before, but mostly from a level of tinkering or deciding to go back to native. The .NET Framework had another benefit to me, and that was WPF. My BHO requires an user interface, and doing that natively isn’t as easy or elegant as using native libraries. Ultimately I decided to go with .NET Framework 4.0, and I can only recommend the .NET Framework 4.

Previous versions of the CLR has a serious drawback when exposing the types to COM: They always used the latest version of the CLR on the machine. If you wrote a BHO in the .NET Framework 1.1, and 2.0 was installed, it would load the assembly using the .NET Framework 2.0. This can lead to unexpected behavior. Starting in the .NET Framework 4, COM Visible types are guaranteed to run against the CLR they were compile with.

See here.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top