• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 831
  • Last Modified:

Change framework 2.0 to 3.5 or higher

Hello all,

I'm working with VB.Net 2005 and I think i'm using framework 2.0.

I need to use the following line: Imports System.Windows.Media

This give me the a error:
Namespace or type specified in the Imports 'System.Windows.Media' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.

I think this is because I need to use framework 3.5 or higher.

How can I change my project to use 3.5 or higher?

Thanks in advance
2 Solutions
If you had vs2008, you could easily target .net 3.5 but with vs2005 it's not possible

VS 2005 was specifically targeted towards the .NET 2.0 framework but could be enhanced by some upgrades to .NET 3.0. For 3.5 however you need VS2008 in which you have the possibility of multitargeting towards 2.0, 3.0 or 3.5.
thecookiecompanyAuthor Commented:
Thanks Dhaest

Is this only possible in vb.net 2008 or is it also possible in vb.net 2010?
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Umar Topia.Net Full Stack DeveloperCommented:
You can import the dll System.Windows.Media of v3.5 in your 2.0 project
thecookiecompanyAuthor Commented:
Hello umartopia,

Can you tell me how to do this. Where can i find the dll.
Mohamed AbowardaSoftware EngineerCommented:
I recommend you to upgrade your project to VS.NET 2008 or 2010 and then change the framework to 3.5 or higher.
Here is a list of supported versions of .NET Framework:

VS 2003: Only .NET 1.1
VS 2005: Only .NET 2.0
VS 2008: .NET 3.5 is standard, but it is also possible to target 2.0 or 3.0
VS 2010: .NET 4.0 is standard, but it is also possible to target 2.0, 3.0 or 3.5

Please also consider that installing .NET framework 3.5 may take a while and will not be possible on Windows 2000, while .NET 2.0 does not take long and is installed on most computers. Only Windows 7 has .NET 3.5 preinstalled. The .NET 3.5 offline installer is also about 200MB big, so this may cause serious deployment problems. I am not sure if all the WPF stuff is worth all the troubles.

I suggest that you only target 3.5 if you really need to.

System.Windows.Media needs at least .NET framework 3.0, but there may be classes in this namespace that need .NET 3.5.
thecookiecompanyAuthor Commented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now