toosweetnitemare
toosweetnitemare

Reputation: 2276

C# backwards compatibility

  1. I am using windows 7 running .net 4.0
  2. I wrote an application on my platform then distributed it to my coworkers.
  3. They are using windows XP .net 3.0 and 3.5
  4. They can not update to .net 4 for business reasons.
  5. I am running Visual studio 2010

How can i make my application backwards compatible so that they can use it?

Upvotes: 2

Views: 1758

Answers (4)

Erick Petrucelli
Erick Petrucelli

Reputation: 14932

Don't use .NET 4.0 features and set the target framework to .NET 3.5 on your project. Then rebuild and redistribute. How to do it:

  • In Visual Studio, open the project you want to change.

  • Right-click the project in Solution Explorer and then click Properties.

  • In the Project Designer, locate the Target Framework list, as follows.

  • For Visual C# projects, the Target Framework list is on the Application tab of the Project Designer. For more information, see Application Page, Project Designer (C#).

  • In the Target Framework list, select the .NET Framework version or profile that you want.

More detailed information here.

Also, about don't using 4.0 features, you can read more about what C# features here.

Upvotes: 3

Tom Gullen
Tom Gullen

Reputation: 61773

Only use features supported by .net 3.5. Don't use any .net 4.0+ features.

Upvotes: 1

alex
alex

Reputation: 3720

If you don't use any .NET 4 specific features, just target 3.0 or 3.5. That will solve any compatibility problems. Here's a link on MSDN detailing how to do it:

  • On the Project menu, click ProjectName Properties.
  • Click the Application tab.
  • In the Target Framework list, select either .NET Framework 2.0, .NET Framework 3.0, or .NET Framework 3.5.

Upvotes: 5

Phil Murray
Phil Murray

Reputation: 6554

Target the .Net v3.51 framework in your project

Upvotes: 1

Related Questions