Harsh
Harsh

Reputation: 3751

Make .net 4 application compatible on .net 3.5

I have created a winform application in Visual Studio (i.e. .net 4.0). Whenever i try to install my application with .net 3.5 it asks to install .net 4.0. How can I make my application compatible on .net 3.5 platform. I have tried changing the Target framework to 3.5 and removing the prerequisites of .net 4.0, but it does not works. Can you suggest me on how to achieve the same?

Upvotes: 2

Views: 2326

Answers (4)

Harsh
Harsh

Reputation: 3751

After a lot of struggle, I finally got the root cause of my issue. I am posting the solution so that others would not have to do any struggle to do this job. After changing the Target framework and prerequisites, check for the dependencies in the setup project. Just follow these steps to get to the desired result:

  1. Double click on the dependencies of the setup project.
  2. Click on the .Net Framework
  3. And you will see the Property window will get enabled.
  4. Change the Version property to your desired .net Framework ( in my case 3.5).
  5. and build your setup again.

Hope this will help others.

Upvotes: 1

AnthonyBlake
AnthonyBlake

Reputation: 2354

Maheep is correct - you need to switch to .Net framework 3.5 as you project target framework. There is no difference between C#.net 4.0 and vb.Net 4.0 - once built and released, both become .Net version 4.0.

Upvotes: 1

psur
psur

Reputation: 4519

Check Project Properties -> Publish -> "Prerequisites..."

And also this can be useful: http://msdn.microsoft.com/en-us/library/cc668079.aspx (especially section "You Have Re-Targeted a Project to a Different Version of the .NET Framework").

Upvotes: 0

Maheep
Maheep

Reputation: 5605

If you want to use C# 4.0 you will need framework 4.0. If you can switch to c# 3.0 then see this answer

Upvotes: 0

Related Questions