Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

If I know .NET 4.0 is installed on a user's machine, can I assume .NET 2.0 is as well?

Tags:

c++

c#

.net

Pretty self-explanatory question, but here's a bit of context:

My app (C++, unmanaged) has a feature written as a C# app. This feature is only available when we know .NET is installed. So, must I maintain separate versions of this C# application for each framework version we want to support, or will a lowest-common-denominator of .NET 2.0 work (thus, if we detect any framework installed >= 2.0, we know we will be OK)?

Note that I prefer to just maintain a single .NET 2.0 version of our C# app.

like image 856
tenfour Avatar asked Dec 09 '22 05:12

tenfour


2 Answers

You can assume that .net 2.0 apps will run on the 4.0 runtime.

See: http://msdn.microsoft.com/en-us/library/ff602939.aspx

like image 153
Will Charczuk Avatar answered Dec 15 '22 00:12

Will Charczuk


The .NET framework dependencies page for .NET 4 on MSDN says that yes, you can count on it:

You do not have to install previous versions of the .NET Framework or the CLR before you install the latest version; each version provides the necessary components.

like image 41
Jon Avatar answered Dec 14 '22 23:12

Jon