Can I reference a .NET 4.5 project from a .NET 4.0 project?

For complex reasons related to historical projects, we have a main project that is used in many products. The problem is that we cannot transfer the project to 4.5, because we have some products that should work in Windows XP. Is there any workaround so that I can reference DLL.NET 4.5 from this .NET 4.0 project?

I understand that we could fork out the project, one for each version of .NET, but this leads to high maintenance costs ....

Any help would be great!

EDIT. - To be clear, we would like to refer to the DLL in .NET 4.5, but any of our products that run on Windows XP will not perform anything from it, only our new products will use their capabilities

+4
source share
1 answer

The problem is that we cannot transfer the project to 4.5, because we have some products that should work in Windows XP.

If these products use a β€œcore project,” you need to leave it on the .NET 4.0 platform or earlier. You cannot use the .NET 4.5 assembly from any project in Windows XP.

If you need .NET 4.5 features, you need to either upgrade these projects or save two versions.

+8
source

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


All Articles