How To Set .NET Framework Target For VB.NET and C# Projects

I heard that many people don't know how to change the .NET Framework target in their projects or they don't know why their programs don't work on others pc who don't have the .NET Framework that you use  so i wanted to write an article about changing the Framework so , i think everyone should target their .NET Framework to the older version because not everyone have the latest .NET Framework ; i always target my Framework to .NET 2.0 because most of the people have .NET Framework 2.0 . There is a small problem in changing your .NET Framework , if you use any latest libraries or maybe algorithms that are not compatible with older versions of .NET Framework then when you change the Framework Target it will show lots of error . I will come to the point now changing the .NET Framework is easy by the way i would like to say that it's better to change the .NET Framework target when you just started the project and don't think to change the .NET Framework in the middle of your project or in a finished project because there is a chance of your project getting corrupted .


If you use Visual Studio or Visual Basic , C-Sharp 2008/2010 what you have to do is go to project properties and go to compile tab in properties then click on Advanced Compile Properties.. button in the bottom as you can see in the picture .
Visual Basic 2010 - Properties pic
After you clicked on Advanced Compile Options a window will popup now you can see a listview control in the bottom now drop down the list then you can see the .NET Frameworks that you have installed in your computer now select a framework .
Visual Basic 2010 - Compile Options
After selecting a Framework version click ok and now save your project and debug your project , you will get lots of warnings but not at all sometimes it will show some warnings and sometimes it will not and don't mind the warnings .

If you use Visual Studio 2012 (VB.NET,C#) then it's more easier to change the .NET Framework target you just need to go to the properties and choose the Framework from there and do as i said before .
I hope this is helpful . I would like to thank NiCz who captured the pictures from Visual Basic 2010 for this article.

3 comments

Do you mind if I quote a few of your articles as long as I provide credit
and sources back to your blog? My blog site is in the
very same niche as yours and my visitors would genuinely benefit from some of the information you provide here.
Please let me know if this okay with you. Thank
you!

Also visit my weblog; http://prolexinblogs.com

Reply

Hello,
I don't think It's a good idea..
Thank you.

Reply

Post a Comment

Note: Only a member of this blog may post a comment.