change from .NET 2.0 to .NET 3.0 version

G

Guest

I would like to change an applicaiton I have from .NET 2.0 target framework
to .NET 3.0 framework. Any suggestions on how to do this?
 
N

Nicholas Paldino [.NET/C# MVP]

Rich,

You shouldn't have to do anything, if I recall correctly, .NET 3.0 is
completely backwards compatable with .NET 2.0. .NET 3.0 is just the
addition of extra libraries. It still uses the 2.0 runtime.
 
G

Guest

from what i understand, .net 3.0 only adds things like WPF, etc. it does not
change the framework like the upgrade from 1.1 to 2.0 did.
 
G

Guest

sorry, I did not give enough information. Here is what I got from the Blend
newsgroup posting I put up. It should clear things up where I am having an
issue:

Well now, I downloaded and tried out the Expression Blend and created a nice
little GUI menu usercontrol, which of course uses .NET 3.0

Now I want to get it into an older .NET 2.0 project. I have C# Express
Edition setup and calling everything right or at least I believe it is right
to use it in my existing .NET 2.0 project as follows:

Menu.UserControl1 uiMenu = new Menu.UserControl1();

I just added the existing .sln file from the Blend Project to my exisiting
soluition and added the Reference to the project I want to use the Menu with.
Everything looks fine... build it and...

I get the following error where I am trying to add the Menu to the .NET 2.0
project:

Error 1 The type 'System.Windows.Controls.UserControl' is defined in an
assembly that is not referenced. You must add a reference to assembly
'PresentationFramework, Version=3.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35'.

----->

So, how do I change my existing project to point to use the .NET 3.0
framework instead of the .NET 2.0 it currently uses?

Thanks in advance.
 
G

Guest

that error tells you what to do, right click on references in the sol'n
explorer and then add reference, find PresentationFramework in the .Net
section and click "ok", this should add the right assembly to your project
 
B

Ben Voigt [C++ MVP]

Rich Elswick said:
sorry, I did not give enough information. Here is what I got from the
Blend
newsgroup posting I put up. It should clear things up where I am having
an
issue:

Well now, I downloaded and tried out the Expression Blend and created a
nice
little GUI menu usercontrol, which of course uses .NET 3.0

Now I want to get it into an older .NET 2.0 project. I have C# Express
Edition setup and calling everything right or at least I believe it is
right
to use it in my existing .NET 2.0 project as follows:

Menu.UserControl1 uiMenu = new Menu.UserControl1();

I just added the existing .sln file from the Blend Project to my exisiting
soluition and added the Reference to the project I want to use the Menu
with.
Everything looks fine... build it and...

I get the following error where I am trying to add the Menu to the .NET
2.0
project:

Error 1 The type 'System.Windows.Controls.UserControl' is defined in an
assembly that is not referenced. You must add a reference to assembly
'PresentationFramework, Version=3.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35'.

----->

So, how do I change my existing project to point to use the .NET 3.0
framework instead of the .NET 2.0 it currently uses?

It's not instead of, it is in addition to.

In the "Solution Explorer" sidebar, or whatever Express edition has,
right-click on "References" and select "Add Reference". Browse to the
PresentationFramework.dll. IIRC, you need about three of these references
added and then everything will work.
 
G

Guest

That was it, done. Thanks for the help. This is what I had expected to do,
but when I went fishing (not using the Search function) for the .dll files I
couldn't find the .net libraries. ....

when I searched, I found them at:

c:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0\

Not quite where you might expect them to be....

I also had to add PresentationCore.dll and WindowsBase.dll as well to get it
to compile.

I still have some warnings to references, but for now I should be able to
move forward. Thanks to everyone for the help!

Rich
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top