Reputation: 4561
Can an assembly that has been targeted for 4.0 load an assembly that was targeted for 4.5?
For example, a project targeting 3.5 cannot load assemblies that were built against 4.0.
Upvotes: 0
Views: 1811
Reputation: 33738
4.5 is an inplace update to 4.0. So yes.
An assembly built against Fx 4.0 can not reference an assembly built against Fx 4.5.
However
An assembly built against Fx 4.5 can reference an assembly built against Fx 4.0.
Upvotes: 4
Reputation: 274
I think it's a bad idea since your .NET4 app will also run on the machine with .NET4 only (without .NET4.5 installed). In this case, your app may run into issues because it may be trying to .NET4.5 functionality but .NET4.5 is not present on the machine. I strongly recommend building .NET4.5 app instead.
Upvotes: 0