ASP.NET - builing .net 4.0 project in .net 3.5

Asked By asif hameed on 04-May-11 02:50 PM

Hi all:

I have created a web application project in asp.net 4.0 and I am trying to build it by setting Target framework 3.5. how can I set the target framework to 3.5 and build this project in visual studio 2010.

Please suggest.

Thanks.

Peter Bromberg replied to asif hameed on 04-May-11 04:21 PM
Framework 3.5 is really just extensions to framework 2.0 So if you target it for Framework 2.0 and have references to any additional assemblies needed, that should work.
TSN ... replied to asif hameed on 04-May-11 11:37 PM
Hi..

To change the target Frame work to 3.5 from 4.0 check the below figures you will get to know..

change the target Framework from ASP.NET 4.0 to ASP.NET 3.5.

 

1) Ensure IIS and the ASP.NET properties are configured for Framework 2.0. Note: Framework 3.5 will not show up in the list of installed options due to the fact that framework 3.5 is an extension of 2.0 and not a stand alone release.

http://www.bnettechnologies.com/BnetBLog/image.axd?picture=ASP.NET%20Properties.png

2) Configure you web application to use target Framework 4.0 by right clicking your website in the solution explorer >> Property Pages >> Build >> Change "Target Framework" to .NET Framework 3.5.

http://www.bnettechnologies.com/BnetBLog/image.axd?picture=VWD%20Site%20Properties.png

http://www.bnettechnologies.com/BnetBLog/image.axd?picture=VWD%20Build%20Properties.png

This will update your web.config file with the correct information.



hope this will help you..