简体   繁体   中英

Compiling C# .net 4 code to .net 3.5?

I made a program in Visual Studio 2010 that targeted .NET 4.0 originally. However, now I need to target .NET 3.5 instead of 4.0. How can I change my target framework version to compile with an earlier version of .NET?

If your code is compilable with C# 3.5 (depends on what you used), right click on your project and press on properties , then in application tab change target framework to 3.5.

Your project will be reloaded and you may now compile it

This article explains you what you should have not used if you want compile code on 3.5

转到Project Properties并在Target Framework下选择.Net Framework 3.5。

Go to Solution Explorer and have on right click on top to display properties of project.There you can change your target framework.. 在此输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM