This is a simple question. I have been writing a software with .NET 4.5 (which is now Beta). What version of .NET runtime is needed to run this software? Is it 4.5? Some older?
Also, are .NET updates part of Windows Update?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In order to run 4.5 compiled assemblies you must have the 4.5 framework installed. The 4.5 install is an in place upgrade which is mostly forwards compatible with 4.0 but is definitely not backwards compatible.
One particular place that can trip you up is type forwarders. The 4.5 framework contains a huge number of new type forwarders (over 1,100 of them). A type forwarder is a way for an assembly to declare that a type moved from assembly A to assembly B. The CLR will silently redirect any references to the given type from A to B.
An assembly compiled against 4.5 though will emit a reference to the type as if it existed in assembly B. If you then run that assembly against a 4.0 install it will expect the type to be in assembly B and it won’t be. The result will be a type load exception.
Concrete Example:
Compile that code on a 4.5 box and then try to run it on a 4.0 box. The result will be a type load exception. The
ExtensionAttributetype moved from System.Core in 4.0 to mscorlib in 4.5