samedi 14 mai 2022

Load Assembly compiled with newer .Net Framework than executing assembly

I have an application compiled with .Net Framework 4.0 and I want to load a WPF UserControl inside it. The user control is a dll compiled for .NetFramework 4.8.

I have been doing some tests with Console Application and I have loaded from .NetFramework 4.0 a dll using reflection. The dll is compiled with .NetFramework 4.8 and using for example the RSA constructor introduced in .NetFramework 4.7

using (var rsa = RSA.Create(2048)){}

It seems that everything is working well. Is this permited or maybe I will have some problem? I thougth that this will fail due the executing or calling assembly was compiled in .Net Framework 4.0.





Aucun commentaire:

Enregistrer un commentaire