C# and .NET Framework interview questions:- Explain Multi-targeting in .NET?

Multi-targeting: – Multi-targeting is the ability to specify the version of the .NET Framework that your application requires to run and have the matching experience while developing it with Visual Studio’s Integrated Development Environment (IDE).

Visual Studio 2010 multi-targeting enables you to take advantage of the latest enhancements to Visual Studio without having to upgrade Web sites or Web services to the latest version of the .NET Framework. This lets you use Visual Studio 2010 to maintain and develop your Web applications that use earlier versions of the .NET Framework.

Let’s see a small demonstration on Multi-targeting.

Create a new project as following diagrams.

As you can see that we have selected ASP.NET Web Application which is targeting the .NET Framework 4.0 with this project, Visual Studio 2010 will automatically filter the toolbox controls and all the properties which are supported in .NET framework 4.0.

Now, let’s see which are the toolbox controls and the properties are available while selecting the .NET Framework 4.0.


Similarly, let’s see when we add reference what the version is been used currently.

As you can see in the above diagram the current version is 4.

Now, let’s see how we change the .NET Framework 4.0 to 2.0.

As soon as you click on properties a new window will open like below window from that select the .NET Framework to 2.0.

As soon as you change the .NET Framework to 2.0, Visual Studio 2010 will automatically filter the toolbox controls and shows only those controls that are shipped in .NET Framework 2.0.

As you can see that few of the control are not available now in the toolbox as we have seen in .NET Framework 4.0 toolbox.

Similarly, let’s see what happen when add reference.

Now, you can see that the current version used is 2.

So, multi-targeting enables you to take advantage of the latest enhancements to Visual Studio without having to upgrade Web sites or Web services to the latest version of the .NET Framework.

Following is the video on different kind of questions that are asked in C# and .NET interviews: –

Get our more C# and .NET Framework interview questions for preparation.

Regards,

Also Visit for more author’s blog on C# and .NET framework interview questions

Advertisements

About c# and .NET Interview questions

This blog is for developers who want to crack .NET and C# interviews. It has all tips and tricks needed to crack .NET interviews , C# interview , SQL Server interview , Java interview , WCF Interview , Silverlight interview , WPF interview , LINQ interview , Entity framework Interview. Do not forget to watch our Learn step by step video series. Learn MVC in 16 hours:- https://www.youtube.com/watch?v=Lp7nSImO5vk Learn AngularJS Step by Step:- https://www.youtube.com/watch?v=0kmdjqgO9IY Learn Design Pattern in 8 hours:- https://www.youtube.com/watch?v=YDobmucohqk Learn C# and .NET in 60 days:- https://www.youtube.com/watch?v=yh2SrzCkNQA Learn MSBI in 32 hours:- https://www.youtube.com/watch?v=mGPJx3ocFgg Learn SharePoint Step by Step in 8 hours:- https://youtu.be/C2fW76SwJNU
This entry was posted in Uncategorized and tagged , , , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s