Charles Young

  Home  |   Contact  |   Syndication    |   Login
  105 Posts | 41 Stories | 452 Comments | 406 Trackbacks

News

MVP - Microsoft Most Valuable Professional

Article Categories

Archives

Post Categories

Image Galleries

Alternative Feeds

BizTalk Bloggers

BizTalk Sites

CMS Bloggers

Fun

Other Bloggers

SharePoint Bloggers

Utilities

WF Bloggers

The recent release of Visual Studio 2008 and .NET Fx 3.5 is causing some confusion.    Microsoft released these two technologies together for good reason.   The wonderful new LinQ technologies introduced in .Net 3.5 rely on explicit compiler-level support, and therefore require LinQ aware compilers in Visual Studio.   The new version of visual Studio provides these compilers, allowing developers to take advantage of the new monadic syntax. In addition, Visual Studio has several new features designed to make it easier to exploit NET 3.5 features such as Ajax and the foundation libraries (WCF, WF and WPF).

The problem is that by tying the release of .NET 3.5 to Visual Studio 2008, the impression is given that, unless you are ready to upgrade to the new version of the IDE, there is no point thinking about upgrading to the new version of the framework.    This is simply not the case.   The .NET framework does not have any built-in dependency on Visual Studio, let alone a specific version of Visual Studio.   More to the point, Microsoft has long since split the versioning of the framework from the versioning of the run-time environment. .NET 3.5 continues to exploit version 2.0 of the CLR. Visual Studio 2005 is perfectly happy to compile your code against .NET 3.5 assemblies.   They are just assemblies.   Even more compelling is the realisation that most of the assemblies in .NET 3.5 are identical to those in .NET 3.0 (same version number).   There are some new assemblies with new features. .NET 3.5 is just .NET 3.0 with extra stuff.

Why is this important?   Well, not everyone is ready to upgrade to Visual Studio 2008.   Apart from the expense this involves, consider the dilemma of BizTalk Server developers.   Currently, there are no Visual Studio 2008 bindings for BizTalk Server (i.e., you can't create BizTalk Server project types in the new IDE).   This, we are assured, will be addressed at some point, but that could be months away.    For the time being, BizTalk developers are stuck with Visual Studio 2005 :-( Hence, some people are currently discounting the possibility of using .Net 3.5 because they believe, quite incorrectly, that it requires an upgrade to Visual Studio 2008.

There are issues, of course.   As well as the absence of compiler support for LinQ, Visual Studio 2005 does not have access to various new project and file templates and tools that support the new version of the framework.   Developers may need to do more coding in Visual Studio 2005 than would be necessary in Visual Studio 2008.   This is often a small price to pay, however, in order to access the improvements in 3.5.    As an example, consider the new integration between WF and WCF, provided in the new System.WorkflowServices assembly.   The integration is provided via the new WorkflowServiceHost class and a couple of new activities.   Visual Studio 2008 has new template support for building workflow services, and comes with a very useful new WCF test harness.   However, exploiting this new functionality in Visual Studio 2005 is trivial.   Create a WF workflow library, add a reference to System.WorkflowServices and add the new activities to your tool box.   Finally, use the WCF Service template to add a service class to your project and you are just about in the same position as you would be in Visual Studio 2008 if you used the new Workflow Service project template.   You'll need to write a couple of lines of code to use WorkflowServiceHost to host your service, of course.   Off you go, and enjoy .NET 3.5.

posted on Saturday, December 01, 2007 11:23 AM

Feedback

# re: Using .NET 3.5 and Visual Studio 2005 12/1/2007 4:47 PM Andy James
Charles,

Just a small question around VStudio 2008 - can it be used side-by-side with VS 2005?

Cheers

# re: Using .NET 3.5 and Visual Studio 2005 12/2/2007 10:12 PM Charles Young
Yes, they should work OK side by side. The last time I tried this was months ago with beta 1 of Orcas - worked almost OK, but there was a problem with project properties which was a recognised bug at the time.

# re: Using .NET 3.5 and Visual Studio 2005 12/4/2007 5:14 AM Pallz
Do we have to instruct VS 2005 explicitly to use the new .Net 3.5 framework?
Which compiler is used when we build using VS 2005 IDE (csc of .Net 2.0 or csc of .Net 3.5)?

# re: Using .NET 3.5 and Visual Studio 2005 12/8/2007 4:52 AM Mohamed E.
I am trying to get going from .NET 1.1 to the next level. When I started to get into .NET 2.0, .NET 3.0 came out and now .NET 3.5
what would you recommend me to do? Get into 2.0 first and pick up upward or just go ahead and learn 3.5.

Thanks,
-Mohamed

# re: Using .NET 3.5 and Visual Studio 2005 12/8/2007 8:46 AM Charles Young
The jump from version 1.0 to version 2.0 was disruptive, especially as Microsoft changed the entire run-time environment. It was a little like the move we made many years ago from 16 bit to 32 bit platforms. Since then, the runtime environment has remained the same, and subsequent versions has simply added new functionality at the class library level. So, personally, I'd go for the latest and best. .NET 3.5 is .NET 2.0, and .NET 3.0, with more stuff. Look at the assemblies (all the ones starting 'System' that come up in the 'Add Reference' dialogue box) and you will see that the majority are still v2.0.
One thing to consider is that, with new functionality, there may be better ways of doing things in .NET 3.5 than in .NET 2.0. An obvious example would be XLinq. With XLinq you can, for example, create XML without using the XML DOM or XmlWriter. Your XLinq code is quite different to the code you write with those older approaches (it uses functional composition and looks very similar to the actual XML). There is no way you will learn the entire class library in depth (unless you spend many years working on lots of very different projects), so maybe this doesn’t matter, but do be aware of the various options you have. See http://blogs.msdn.com/mikechampion/archive/2006/06/30/652896.aspx for a discussion on what XLinq does not give you compared to these older approaches. Another example is the older ASP.NET support for web services compared with the new WCF approach introduced in .NET 3.0. You can still use ASP.NET for web services if you need to , but if you have WCF at your disposal, and free reign to use this technology in your development, then there is little or no need to learn how to create .asmx web services.


# re: Using .NET 3.5 and Visual Studio 2005 12/11/2007 1:34 PM McBIt
The problem with installing VS2008 is the cost of licensing. You don't get the same functionality with the free versions as with VS2005. Upgrading a team of 30 people, for example, may dramatically increase the cost of a project: licensing, time to install and manage manage the upgrade, etc. Having a plug-in that would allow creating and compiling projects with LINQ support could bring the cost of .Net 3.5 upgrade down.

# re: Using .NET 3.5 and Visual Studio 2005 12/11/2007 2:12 PM Charles Young
I doubt they would offer such a plug-in. It would seriously undermine the sales of Visual Studio 2008. Unfortunately, Microsoft remains a commercial company, and not a charity ;-

# re: Using .NET 3.5 and Visual Studio 2005 12/14/2007 5:11 PM John
I'm new to .net programming. If you help me with a few novice questions I would appreciate it.

I just installed .net 3.5 over 2.0. I use Studio 2005. How do I go about using some of the new features/controls in 3.5. I've added the 3.5 reference to my projects but none of the controls listed for the framework are available. Any help would be appreciated.

John

# re: Using .NET 3.5 and Visual Studio 2005 1/23/2008 3:30 PM Magnus
John, you probably already solved this but anyhow, rightclick on an empty spot of the toolbar and choose "Add Tab", Name it whatever you like, for example .Net 3.5. Rightclick inside the new tab you created and choose "Choose Items". Browse for the .net 3.5-dlls. If you can't add one/many of them try one at a time. I haven't done this myself but this is how to add controls that aren't added during the install. Sounds weird though that Microsofts controls weren't added automatically during the .Net 3.5-install.

# re: Using .NET 3.5 and Visual Studio 2005 1/25/2008 10:52 AM Prasanna Krishnan
Good stuff charles, you made my day. I was about start the migration of existing solutions from VS 2005 to VS 2008.

# re: Using .NET 3.5 and Visual Studio 2005 2/16/2008 3:56 PM Jimit
Hi Charles, just a couple of quick questions about using WF v3.5 in VS 2005. You mentioned several v3.5 specific activities that'd been added but when them to the toolbox all I get are the new Receive and Send activities. Are these the only new activities? How do Receive and Send compare to WebServiceInputActivity and WebServiceOutputActivity from v3.0? When you add a Receive activity to you workflow and subscribe to a particular operation contract, does the plumbing for listening to requests on that operation still get done for you? And how do you host your service using WorkflowServiceHost?
Like the others here we're not quite ready to upgrade to VS 2008, but we probably will some time later during the year. My worry is that of code compatibility for when we do make the switch. VS 2008 does recognize VS 2005 projects doesn't?

# re: Using .NET 3.5 and Visual Studio 2005 3/10/2008 8:53 AM Deem
Hello Charles,
May you kindly provide any input regarding my issue.. i've installed 3.5 .net framework and we are using VS 2005.. in order to make use of its new libraries like System.Linq, System.Core, System.Data.Linq i've added them as references in my web project..
but the compiler has an issue with understanding my new expressions that attempt to use Linq features..


example:

int[] numbers = { 5, 4, 1, 3, 9, 8, 6, 7, 2, 0 };

var numsPlusOne =
from n in numbers
select n + 1;



any idea what am i doing wrong?

thank u in advance!!


# re: Using .NET 3.5 and Visual Studio 2005 3/10/2008 10:30 PM Charles Young
Yes, that's to be expected I'm afraid. Installing .NET 3.5 doesn't upgrade the compilers you get with Visual Studio 2005. You have to get VS 2008 if you want to use the new C# or VB.NET syntax. I mentioned this absence of compiler support in the article.

There is, of course, a distinction between sytax that is understood by a compiler, and the underlying libraries and types that the syntax expolits. You still have full access to Linq technologies, but you have to write code using 'standard' syntax.

Here is the above code (plus some additional code to print out the results) written 'long-hand'. This compiles in VS 2005. You need to give your project a reference to System.Core v3.5 and import the System.Linq namespace.

int[] numbers = { 5, 4, 1, 3, 9, 8, 6, 7, 2, 0 };

//var numsPlusOne = from n in numbers select n + 1;
IEnumerable<int> numsPlusOne = Enumerable.Select<int, int>(numbers, delegate(int n) { return n + 1; });

foreach (int nNew in numsPlusOne)
{
Console.WriteLine(nNew);
}



# re: Using .NET 3.5 and Visual Studio 2005 3/11/2008 6:15 AM Deem
Dear Charles,
I thank you very much for this clarification.. i was staring at the screen for an hour and searching trying to figure that out!! It makes perfect sense.. i appreceate your time and effort in the example. : )


# re: Using .NET 3.5 and Visual Studio 2005 3/19/2008 5:36 PM Chris
Dear Charles,

I recently got a job as a web developer (my first development job!). I was learning some .Net 2008 for the first week or so and then they told me they wanted to switch back to 2005. i'm having trouble getting this one project to compile w/out linq.

basically i have (using C#)

public class MenuMaker
{
public Random Randomizer;
// some string arrays here
public string GetMenuItem()
{
// from the varios arrays return a string displaying a
//random menu item
}
}


and then in my form I have:

public FormRandomMenuToday()
{
InitializeComponent();
MenuMaker menu = new MenuMaker() { Randomizer = new Random()};
label1.Text = menu.GetMenuItem();
}


Basically the object Initializer, Randomizer = new Random(), doesn't seem to compile and I've tried different things such as MenuMaker menu = new MenuMaker();
menu.Randomizer = new Random();

Anyway, any help you could give me would be appreciated.




# re: Using .NET 3.5 and Visual Studio 2005 3/19/2008 7:00 PM Martin
Hello Chris,

i whould suggest you to initialize the Randomizer in the constructor of the MenuMaker. You hava a constructoer, don't you?

public class MenuMaker
{
Random Randomizer;
public MenuMaker()
{
Randomizer = new Random((int)DateTime.Now.Ticks);
}
public string GetMenueItem()
{
return Randomizer.Next(1000).ToString();
}
}

public Form1()
{
InitializeComponent();
MenuMaker mnu = new MenuMaker();
label1.Text = mnu.GetMenueItem();
}



# re: Using .NET 3.5 and Visual Studio 2005 3/20/2008 10:47 AM Charles Young
OK, my blog is clearly leading to misunderstandings, and I need to carefully qualify what is going on here. People need to make a very clear distinction in their minds between different things:

a) The .NET Framework
The framework is chiefly composed of a library of pre-written object orientated code -i.e., a class library, or perhaps more accurately, a set of libraries.

b) The C# and VB.NET compilers
These are written as .Net assemblies. The new compilers are bundled with the framework.

c) The C# and VB.NET editing and compilation support provided in Visual Studio.
Starting with Visual Studio 2008, Microsoft has enhanced these tools so that you can easily target different versions of the framework. This includes targeting different versions of the C# and VB.NET compilers.

Note the following points:

• All .NET 3.5 code complies with the standardised definitions for version 2.0 of the Common Language Runtime. This includes all the code in the class libraries, including Linq, and even the code in the compiler assemblies. Hence, Visual Studio 2005 can access any public members of any public classes anywhere in the library, and can even reach protected and private members via reflection. This is why you can happily exploit WCF 3.5 within Visual Studio 2005.

• Visual Studio 2005 predates .NET 3.5 and therefore its code editing and compilation features do not target or support the versions of the compilers provided with .NET 3.5. Hence, there is no support for new syntax supported by the latest compilers, which is why Chris' code won't compile (it uses the new object initializer syntax).

Syntax supported in a compiler is one thing. The underlying classes and other types exploited by specialised syntax such as Linq are something different. You don't have the ability to use the new Linq syntax in the old version of Visual Studio. You do, however, have the ability to access the underlying class libraries directly using 'traditional' syntax.

Having said all this, I could be irresponsible and point out that Microsoft did release some Linq CTP tooling for Visual Studio 2005. This is still available at:

http://www.microsoft.com/downloads/details.aspx?familyid=1e902c21-340c-4d13-9f04-70eb5e3dceea&displaylang=en.

It may be possible to use this in conjunction with careful changes to Microsoft.CSharp.targets referenced in the MSBuild script contained in your project files in order to convince Visual Studio 2005 to support the latest syntax and compilers. I wouldn't recommend this, as this depends on CTP code, which may not offer complete support for the syntax supported in the release version of Visual Studio 2008, and a degree of black-belt manipulation of the mechanics of Visual Studio. I take no responsibility for any problems people might encounter if they try to get this to work!


# re: Using .NET 3.5 and Visual Studio 2005 3/22/2008 8:50 AM Ashit Barot
Hi Charles,
I have VS 2005 with .Net Framework 2.0 and then i installed C# 2008 Express edition on my computer, it has installed .net framework 3.5 as well.
Now my problem is
I wan to create a new website with WCF service template using VS 2005. But Add new web site doesn't list the 'WCF Service' temlate.

Do i need to download template from internet? or .net framework 3.5 should enable that in VS 2005 IDE?

Thanks,
AB

# re: Using .NET 3.5 and Visual Studio 2005 3/28/2008 6:08 PM David Young
If assemblies in .NET 2.0 and .NET 3.5 have the same name, how does VS know which one to use?

# re: Using .NET 3.5 and Visual Studio 2005 3/28/2008 6:14 PM Charles Young
Simple. They are strong-named assemblies. Their identities include not only the simple name, but also the version number, a culture specifier and a public key (often represented as a short hashed 'public key token). This is one of the most fundamental aspects of code packaging in .NET, and is the basis for side-by-side deployment of versioned releases of the same code.

# re: Using .NET 3.5 and Visual Studio 2005 3/30/2008 8:34 AM Johnnyxp64
There is Still a huge problem with Visual Studio 2005's page properties if you install .net 3.5 with VS2005!

i am missing fields like form startup etc and projects are crushing! if i uninstall .net3.5 all is back to normal, i need Both of them installed at the same time! i dont need vs2008 any solutions found?????????????

# re: Using .NET 3.5 and Visual Studio 2005 3/30/2008 11:25 AM Charles Young
I haven't personally run into these problems. There was an issue with project properties with the first beta or 'Orcas', but that affected 'Orcas', not Visual Studio 2005. Of course, Visual Studio 2005 was never the most bug-free release of Microsoft's IDE. Have others had similar problems?

# re: Using .NET 3.5 and Visual Studio 2005 3/31/2008 9:08 AM johnnyxp64
hi Charles,

so to make it clear, lets say you have a clean installation of Windows x64 or Vista x64 (cause thats my case)
or ok Windows x86

then what is the Proper Order to install them in order to work fine as they work in your system?

ex

0)windows+sps+hotfixes+drivers NO .NET (yet)
then what?
1).NET 3.5
2)Visual Studio 2005 (.net 2.0)
3)Visual Studio 2005 Sp1?

or

0)windows
1)Visual Studio 2005
2).Net 3.5?

and what about .net 2.0 service packs?
if i manage to have .net 3.5 working i DONT need to install .NET 2.0 service packs? i am even free to uninstall it completle?

how excactly is this working .net 3.5 is an upgrade if it detects .net 2.0 or a Different stand alone library?

tnx for your time i have just format my system and waiting for your rresponse to go on and continue my project!

tnx a lot


# re: Using .NET 3.5 and Visual Studio 2005 3/31/2008 3:05 PM Charles Young
I'd naturally go for the second option re. installation order on the grounds that this mirrors the order in which the software was released. On much the same grounds, you could install all applicable service packs ( in the order they were released. This would ensure that, if your issues really are due to having .NET 3.5 installed on your machine, at least you will have a build that will probably most closely resembles the test environment that Microsoft used at the time they tested and released 3.5 (actually, I would rather hope that they tested extensively against machine builds that use all kinds of different installation orders).

If you get any hard evidence that .NET 3.5 is sensitive to the installation order of previous versions and service packs, you should report this to MS as a bug. It certainly won't be by design. As I said in the article, most of the assemblies that make up 3.5 are identical to those in 3.0. Most of the assemblies in 3.0 are identical to those in 2.0. It seems that Microsoft has, with each release, placed new functionality into new assemblies and kept existing assemblies unchanged. Quite right too. Despite a previous reply to David's comments, I can't find much evidence that they are actually relying on side-by-side deployment. So, a quick count on my box suggests that the 'System' assemblies break down as follows:

27 assembles from v2.0
11 additional assemblies from v 3.0 (introduction of WCF, WF, WPF and Cardspace)
14 additional assemblies from v 3.5 (introduction of Linq, Ajax, etc)


# re: Using .NET 3.5 and Visual Studio 2005 3/31/2008 4:22 PM Johnnyxp64
first of all i really thank you for your fast replies

ok it worked! but here is what i have found causes the issues.
i want my pc installation to be as clean as possible for professional coding software for 2 major points:
a)Performance
b)controled dependences (.net active x)

1)so what i did in Vista x64 Sp1 with all hotfixes!
2)Visual Studio 2005 + sql2005x64 (without .net 2.0 sdk)
3)Visual Studio 2005 SP1
4)Visual Studio 2005 SP1 hotfix for Vista
5).Net 3.5 (yes thats right No 1.1 no 2.0 no service packs)
6)SQL 2005 x64 +SP2 +Tools
7)restart pc
8)DevXpress 7.22 controls for vs2005 :)
9)restart


all my project opend Corectly and worked Perfect!
all my Project Framework Properties was there builing was 100% succesful and the all studio performance amazing fast!

i imagine in Windows XP x64 will be even faster..

i rechecked through add-remove software that only one .NET was installed and that was true only 3.5 :)

i reformated and i did all of those from the begging! (yes i am crazy :) BUT this time in STEP 2) i Installed .NET 2.0 SDK all the rest was in the same order.
Now THAT Killed the framework project properties :&
if you have a microsoft link i think thats a worthy BUG to report ;)


so the question remaining is, why i did all those? I want vs2005 to program that works with devexpress 7.22 version and its lighter than vs2008 and i also needed the net3.5 for having Web Express 2.0 installed AND i need to learn how to use LINQ in vs2005.

so i reread your article, but i was a little confused at the and in how i can actually write LINQ code in vs 2005???
sorry bu English isnt my native.

any step by step guide whould be very apriciated by everyone =)

# re: Using .NET 3.5 and Visual Studio 2005 3/31/2008 4:58 PM Johnnyxp64
damn i was wrong :(
.net 2.0 WAS installed!
how exactly can i force my projects to be compiled with .net 3.5 ONLY and not 2.0 as you said 3.5 has what the previous version had + new assemblies so why should i need to have 1.1 sp3 2.0 sp2 and 3.5 ALL installed?

tnx

# re: Using .NET 3.5 and Visual Studio 2005 4/8/2008 3:30 AM kız oyunları
kız oyunları oyna

# re: Using .NET 3.5 and Visual Studio 2005 4/23/2008 11:45 AM yakub
I am using vs2005. i installed .net Freawork 3.5 for using the AJAX.am getting few erors like ScriptManager could not found ...etc..is their i need to install any toolkit for that...plz help

# re: Using .NET 3.5 and Visual Studio 2005 4/25/2008 8:26 AM SanthanaM.veradis
In visual studio 2005, file menu-> new-> project-> c#-> there is a 3.0 framework. this is the start of .net framework 3.0..

Like wise after installed 3.5 i didn't see .net framework 3.5 inside vs 2005. then how should i use .net framework 3.5?

Thanks with regards!

# re: Using .NET 3.5 and Visual Studio 2005 4/25/2008 10:09 AM Charles Young
Hi Santhana

It sounds as if ou have installed the Visual Studio 2005 Extensions for .NET 3.0 (WCF &amp; WPF), November 2006 CTP. This was a stop-gap Community Technology Preview that provided an early version of some the project templates planned for Visual Studio 2008. Microsoft never intended this to be used for writing production code, and never updated it.

You certainly won't get a .NET 3.5 set of templates in Visual Studio. Microsoft has not created any such extensions.

The good news is that, because .NET 3.5 is really just .NET 3.0 with additional assemblies, the CTP tools you have installed should still work, even though you have upgraded to .NET 3.5. Of course, some of the tooling may prove buggy, and as I noted in the article above, you won't have any nice compiler support for the new Linq syntax ('syntactic sugar' for using the undertlying Linq functionality introduced into .NET 3.5).

# re: Using .NET 3.5 and Visual Studio 2005 4/29/2008 5:21 PM Ghalib
Hi Charles,
One question comes up again and again and I seem not to get any answer to it. The question was, when I install a 3.5 over a 2.0, does the 3.5 replaces 2.0? I think not, because they have their own folders.
Now, if 3.5 does not replaces 2.0, then, how can I instruct my EXISTIN application (which was built when only 2.0 was present) to start using 3.5 dlls instead of the old ones. Do I change things in my project properties? Do I have to add new references? Do I place code in web.cofig? Or simply I don't do any thing and vs 2005 will figure and use the latest and greatest!
thanks


# re: Using .NET 3.5 and Visual Studio 2005 5/6/2008 11:10 AM Guy Ronen
Hi Charles,
I am using VS 2005 + SP1 on Vista for .NET 2.0 development.
Can you summarize the installations i need to develop 3.0 and 3.5 applications?
Can you provide links to the needed downloads and the order in which I should install them?
Thanks in advance.
Guy.

# re: Using .NET 3.5 and Visual Studio 2005 5/8/2008 3:45 PM james
oh you people don't know what a confused n00b is

i've downloaded and installed 3.5 in hopes of learning how to do it, but i have no idea what to do next, how do you open this up, there is no icon or anything, is there a start>run> something, i am at a complete loss, can anyone help

# re: Using .NET 3.5 and Visual Studio 2005 5/8/2008 7:50 PM Charles Young
Hi Guy

.NET framework 3.5 can be downloaded from http://download.microsoft.com/download/6/0/f/60fc5854-3cb8-4892-b6db-bd4f42510f28/dotnetfx35.exe.

You are using Visual Studio 2005. There is no official support for Visual Studio 2005 extensions for .NET 3.x features, but you might want to download the .NET Framework 3.0 (WCF & WPF), November 2006 CTP in order to get some templates for WCF, WF and WPF. You can get this from http://www.microsoft.com/downloads/details.aspx?FamilyId=F54F5537-CC86-4BF5-AE44-F5A1E805680D&displaylang=en. Use AT YOUR OWN RISK!



# re: Using .NET 3.5 and Visual Studio 2005 5/8/2008 7:54 PM Charles Young
Hi James

The .NET Framework is a class library. It isn't a product, so you won't see an icon for opening up some application. You need to drop into Visual Studio, create a new project and add references as required to .NET system assemblies. This can include new assemblies introduced in .NET 3.5.

# re: Using .NET 3.5 and Visual Studio 2005 5/9/2008 12:33 AM StarTraX
I too am having problems "seeing" .NET 3.5 from VS2005. I want to upgrade to 3.5 in the hope that it fixes a bug in 2.0 which won't deploy to the web.
I have installed 3.5, but the Help->About Microsoft Visual Studio is still reporting .NET 2.0.50727 SP1. When I deploy, my application is still running with .NET 2.0
Sorry if this is dumb, but I am also a bit new to the game.
I would like to know how to tell VS2005 to use .NET 3.5, not 2.0
Thanks in anticipation.

# re: Using .NET 3.5 and Visual Studio 2005 5/9/2008 2:12 AM Charles Young
Never trust the information you get in the About dialog!

Seriously, though, the versioning around .NET does cause a lot of confusion. The trouble, very simply, is that the term '.NET' is used in different contexts. The main points here are to consider the difference between the .NET runtime environment (the CLR) and the .NET Framework (.NET Fx). When Microsoft released .NET 2.0, both of these were at the same version, which is essentially 2.0.50727. Since then, Microsoft has not updated the runtime (expect in terms of the service pack) but has gone through a couple of versions of the framework. So, yes you are still using version 2.0.50727 of the runtime, but you have upgraded your machine to version 3.5 of the framework.

The framework, essentially, is just code, packaged into a library of assemblies. They are just assemblies - the same kind of thing as the assemblies you create as part of the applications you write. You reference them in your Visual Studio projects in the normal way. Most of the assemblies in .NET Fx 3.5 still have earlier version numbers. This is because, with each new framework version, Microsoft has left all the existing assemblies intact, and added new functionality in new assemblies. Hence, in .NET Fx 3.5, a handful of new assemblies have appeared which are at version 3.5.0.0. Open a new project in Visual Studio and then add a reference to System.Xml.Linq using the .NET tab. Look carefully and you will see that this is a version 3.5.0.0 assembly. It was introduced in .NET Fx 3.5. Now add a reference to System.Xml. This is a version 2.0.0.0 assembly. It hasn't changed since .NET 2.0 was released. Note how Microsoft doesn't set the build or release numbers for the 4-part version specifiers of Fx assemblies, and uses a three-part version specifier when referring to the runtime environment.

Having added your reference to System.Xml.Linq, you are now in a position to exploit new .NET Fx 3.5 functionality in your project. Unfortunately, you code editor doesn't support the new 'syntactic sugar' for Linq that was added in Visual Studio 2008. However, you can happily use all the classes and other types in System.Xml.Linq in the 'traditional' manner.


# re: Using .NET 3.5 and Visual Studio 2005 5/9/2008 4:38 AM StarTraX
Thanks for the quick exhaustive response. I will take your advice about not believing the About dialog!
As I indicated in my initial post, my initial problem is that I can't publish to the web, and the upgrade to 3.5 hasn't fixed it.
Have you any advice - I have a VP application that I published using the VS2005 publishing wizard. It's at http://gpsanimator.com/publish/publish.htm but just doesn't work. Both the launch link and the install button result in the presentation of an XML page from http://www.gpsanimator.com/publish/StarTraX.application. The application just does not install on the client.


# re: Using .NET 3.5 and Visual Studio 2005 5/26/2008 7:07 AM Ajikumar
Hi,

I'm using .Net Framework 3.5 now, but some fixes need done so i want to work on my previus version ie .Net Framewrok 3.0. But the new 3.5 its asking conversion to new framework. How to get ride of this conversion.

~Aji.

# re: Using .NET 3.5 and Visual Studio 2005 5/28/2008 11:31 AM navin
wedfwedfweqf

# re: Using .NET 3.5 and Visual Studio 2005 7/5/2008 5:49 PM +18 oyun
thanks very god

# re: Using .NET 3.5 and Visual Studio 2005 7/5/2008 5:49 PM msn nickleri
ooo very god.. man

# re: Using .NET 3.5 and Visual Studio 2005 7/5/2008 5:50 PM kız oyunları
thnk you

# re: Using .NET 3.5 and Visual Studio 2005 7/5/2008 5:51 PM +18 oyun
very nice man

# re: Using .NET 3.5 and Visual Studio 2005 7/9/2008 9:19 PM Peter
Great article - it all makes perfect sense, especially the bits about the confusion over 2005 and .NET 3.5. One question that I haven't seen answered or addressed anywhere is - Can VS2005, with 3.5 installed, convert a 1.1 project to 3.5 using the wizard?

# re: Using .NET 3.5 and Visual Studio 2005 7/11/2008 8:34 PM Geoff
Charles, thanks for the excellent info. Do you know if the VS2005 deployment project will download and install Framework 3.5 as it does for 2.0? And if I don't reference any of the new (3.0+) assemblies from my project then I guess it will run on a machine which has only 2.0 installed? Thanks again.

# Can i convert directly from .net 1.1 to .net 3.5 7/23/2008 7:49 AM subbarao
hi,

How to convert the application from .net 1.1 to .net 3.5.

Can i directly convert my application from .net 1.1 to .net 3.5
or
first convet to .net 2.0 and then .net 3.5.

Please help me related to this.

Regards,
bvr.subbarao

# re: Using .NET 3.5 and Visual Studio 2005 8/17/2008 1:19 PM Binju Paul
i am using vs2005 i have installed .net3.5 framework. can i get the facility of ajax for the application on .net 2.0

Post Feedback

Title:
Name:
Email: (never displayed)
Url:
Comments: 
Please add 2 and 2 and type the answer here: