Reputation: 455
If I coded my .net application using version 4.5 and the client machine that will run the application only has .net version 2.0, will the application run?
When coding in .net(mainly in c#) do you guys keep in mind the .net versions your clients maybe using?
Also, if I used some of the newer features(such as linq2sql, optional parameters, etc..) that are only available on later .net versions in coding my application, will those have effects if the client machine has only earlier versions?
Upvotes: 0
Views: 316
Reputation: 8337
Your client must have the framework you target or higher. So, if you write a .Net application that uses the 4.5 framework, your clients must have the 4.5 framework installed on their computer, or your application will not run. If you write an application that targets the .Net 2.0 framework, your client can be running any version of .Net 2.0 or higher and use your application.
Take a look at the .Net Version Compatibility article at MSDN:
Backward compatibility means that an application developed for a particular version of a platform will run on later versions of that platform. The .NET Framework tries to maximize backward compatibility: Source code written for one version of the .NET Framework should compile on later versions of the .NET Framework, and binaries that run on one version of the .NET Framework should behave identically on later versions of the .NET Framework.
Also take a look at the .Net Framework Versions and Dependencies article on MSDN:
Each version of the .NET Framework contains the common language runtime (CLR), the base class libraries, and other managed libraries. This topic describes the key features of the .NET Framework by version, provides information about the underlying CLR versions and associated development environments, and identifies the versions that are installed by the Windows operating system.
The following illustration summarizes the version history and identifies the versions that are installed by Windows.
There are many considerations to account for when deciding the version of .Net to target, including the benefits of running a newer framework (does it have newer features you'd like to use). Take a look at this Stack Overflow question for some more thoughts on the topic: What .NET Framework and C# version should I target with my class library?
Upvotes: 5
Reputation: 20585
If I coded my .net application using version 4.5 and the client machine that will run the application only has .net version 2.0, will the application run?
Yes! your client will not be able to run the application. Your client either needs the same version of .net or version greater then that!
When coding in .net(mainly in c#) do you guys keep in mind the .net versions your clients maybe using?
Yes we do, we generally asks client what version he already has installed, if you are going to use a newer version of framework ask the client if he is comfortable with it.
Also, if I used some of the newer features(such as linq2sql, optional parameters, etc..) that are only available on later .net versions in coding my application, will those have effects if the client machine has only earlier versions?
Yes it will have that effect certainly, as the client will be able to run the application compiled against the .net framework version you coded
Upvotes: 1