Using VS 2008 to Create New ASP.NET 2.0 with ASP.NET AJAX 1.0 Projects

One of the great new features of VS 2008 is its support for framework multi-targeting.  This enables you to use VS 2008 on .NET 2.0, .NET 3.0 and .NET 3.5 projects, and does not require you to upgrade your projects to the latest version of the .NET Framework in order to take advantage of new Visual Studio 2008 features (like JavaScript Intellisense, JavaScript Debugging, code editing, nested master pages, and the improved web designer and CSS features - all of which work with .NET 2.0, 3.0 and 3.5 projects).

ASP.NET AJAX 1.0 Multi-Targeting Support

VS 2008 out of the box allows you to open and edit existing ASP.NET 2.0 applications built with the separate ASP.NET AJAX 1.0 download we shipped last year.  The VS 2008 multi-targeting support works just fine with these projects, and you can use the improved JavaScript and web designer support with them - while still targeting .NET 2.0 and ASP.NET AJAX 1.0.

New ASP.NET AJAX 1.0 Project Templates for VS 2008

Out of the box VS 2008 doesn't include project templates for creating brand new ASP.NET 2.0 with ASP.NET AJAX 1.0 applications.  Right before Christmas we shipped a web free web download for VS 2008 that enables these project templates options.  You can download them here (note: you also need to make sure you have ASP.NET AJAX 1.0 installed on your machine in order to use them). 

Once these additional project templates are installed, you can use File->New Project or File->New Web Site within VS 2008 to create ASP.NET AJAX 1.0 applications that run on ASP.NET 2.0:

New ASP.NET AJAX 1.0 Web Site:

New ASP.NET AJAX 1.0 Web Application:

Applications built using these project templates do not require .NET 3.5 to be installed on a server in order to work - you can copy them to any existing web server that has .NET 2.0 and ASP.NET AJAX 1.0 installed and they will work fine.

Hope this helps,

Scott

Published Thursday, January 03, 2008 10:15 PM by ScottGu

Comments

# re: Using VS 2008 to Create New ASP.NET 2.0 with ASP.NET AJAX 1.0 Projects

Friday, January 04, 2008 3:11 AM by Aneef

hi scott,

Thank you for the information.

# re: Using VS 2008 to Create New ASP.NET 2.0 with ASP.NET AJAX 1.0 Projects

Friday, January 04, 2008 3:26 AM by Kashif

Is it possible to open and edit existing Asp.net 1.1 projects in vs2008 without requiring to upgrade them?

# re: Using VS 2008 to Create New ASP.NET 2.0 with ASP.NET AJAX 1.0 Projects

Friday, January 04, 2008 3:33 AM by ScottGu

Hi Kashif,

>>>>>> Is it possible to open and edit existing Asp.net 1.1 projects in vs2008 without requiring to upgrade them?

Unfortunately not.  VS 2008 only supports .NET 2.0, 3.0 and 3.5 projects.  You need to use VS 2003 for 1.1 projects.

Sorry!

Scott

# re: Using VS 2008 to Create New ASP.NET 2.0 with ASP.NET AJAX 1.0 Projects

Friday, January 04, 2008 3:40 AM by BarryD

Ah nice. One thing that worries me is that right now the only way I can see to discover stuff like this is subscribing to your blog (which obviously a lot of us do).

I cannot for the life of me find a VS2008 download page; where things like this ought to be listed. It makes me wonder what else I've missed that would be useful for me. There's nothing obvious on the developer center, it didn't appear in featured downloads for VS2008, heck it's not even *in* the VS2008 category on msdownloads. Either featured downloads becomes less marketing orientated, or there should be better discoverability on the download site (with an RSS feed please!)

# Шаблоны ASP.NET AJAX 1.0 для Visual Studio 2008

Friday, January 04, 2008 3:54 AM by Ivan Stus Blog

Scott Guthrie анонсировал выпуск шаблонов проектов AJAX 1.0 для ASP.NET 2.0 под Visual Studio 2008 .

# re: Using VS 2008 to Create New ASP.NET 2.0 with ASP.NET AJAX 1.0 Projects

Friday, January 04, 2008 4:01 AM by Patay Khan

There was a confusion going on that VS2008 actually targets .NET 2.0 SP1 and therefore if the server has only .NET 2.0 bits installed (without SP1), it may not work.

Can you clarify if this is true, if so isn't it better to write VS 2008 targets .NET 3.5, 3.0 SP1 and 2.0 SP1 instead?

Here is link to one such post: staff.develop.com/.../PermaLink.aspx

# Using VS 2008 to Create New ASP.NET 2.0 with ASP.NET AJAX 1.0 Project

Friday, January 04, 2008 4:05 AM by DotNetKicks.com

You've been kicked (a good thing) - Trackback from DotNetKicks.com

# re: Using VS 2008 to Create New ASP.NET 2.0 with ASP.NET AJAX 1.0 Projects

Friday, January 04, 2008 4:44 AM by ScottGu

Hi Barry,

>>>>>>> Ah nice. One thing that worries me is that right now the only way I can see to discover stuff like this is subscribing to your blog (which obviously a lot of us do).

Sorry about that.  We are going to try and get these VS downloads in one place that is easy to peruse.

In general I'd recommend visiting www.asp.net to find all ASP.NET related downloads in one place.  I'll also obviously blog about announcements here as well.

Thanks,

Scott

# re: Using VS 2008 to Create New ASP.NET 2.0 with ASP.NET AJAX 1.0 Projects

Friday, January 04, 2008 4:46 AM by ScottGu

Hi Patay,

>>>>>>> Can you clarify if this is true, if so isn't it better to write VS 2008 targets .NET 3.5, 3.0 SP1 and 2.0 SP1 instead?

VS 2008 can target .NET 2.0 (no SP1) as well as .NET 2.0 SP1.  You do want to be careful not to use any new SP1 specific APIs within your project to-do this (in general there are only a few APIs in the SP - so the surface area you need to worry about it pretty small).  

We are looking to make a FXCOP rule available in the future that will make it easy to automatically test that you aren't using SP1 APIs or features.  

Hope this helps,

Scott

# re: Using VS 2008 to Create New ASP.NET 2.0 with ASP.NET AJAX 1.0 Projects

Friday, January 04, 2008 4:59 AM by Knaģis

As far as I have tested, when using this setting, the DisableAjaxPolicy script (the one that removes explicit machine-wide assembly mapping from System.Web.Extensions 1.0 to 3.5) has to be run on the machine in order to create precompiled applications. Without it, the precompilated app won't work on server without .NET 3.5. I wasn't able to find a download link anymore (other than the one to my desktop), so if this is true, please update the post for future :)

# re: Using VS 2008 to Create New ASP.NET 2.0 with ASP.NET AJAX 1.0 Projects

Friday, January 04, 2008 5:05 AM by ScottGu

Hi Knaģis,

>>>>>>>> As far as I have tested, when using this setting, the DisableAjaxPolicy script (the one that removes explicit machine-wide assembly mapping from System.Web.Extensions 1.0 to 3.5) has to be run on the machine in order to create precompiled applications. Without it, the precompilated app won't work on server without .NET 3.5.

We had an issue with Beta2 where you needed to run the DisableAjaxPolicy.  With the final VS 2008 RTM release, though, that isn't required.  When you use the above project templates it explictly compiles the application against ASP.NET AJAX 1.0 - in which case .NET 3.5 isn't required on the server.

Hope this helps,

Scott

# re: Using VS 2008 to Create New ASP.NET 2.0 with ASP.NET AJAX 1.0 Projects

Friday, January 04, 2008 5:15 AM by Knaģis

yes, I suppose that is true. I had forgot that some time ago when those probles arose I used Beta2...

# re: Using VS 2008 to Create New ASP.NET 2.0 with ASP.NET AJAX 1.0 Projects

Friday, January 04, 2008 5:49 AM by Aliyfa

This case, is Web deployment Project will work as well (for ASP.NET AJAX 1.0 using Net Framework 2 in VS 2008) ?

# re: Using VS 2008 to Create New ASP.NET 2.0 with ASP.NET AJAX 1.0 Projects

Friday, January 04, 2008 6:14 AM by Marcos

Scott,

If I have one asp.net 2.0 project and open it with vs 2008, after this will be possible to re-open the same project using vs 2005?

I'm asking this because the same team could use diferent vs versions to edit asp.net 2.0 projects.

Thanks.

# re: Using VS 2008 to Create New ASP.NET 2.0 with ASP.NET AJAX 1.0 Projects

Friday, January 04, 2008 7:50 AM by Marko

Ql, solved my problem :)

# re: Using VS 2008 to Create New ASP.NET 2.0 with ASP.NET AJAX 1.0 Projects

Friday, January 04, 2008 9:25 AM by Steven Harman

Scott,

I recently ran into a multi-targeting Gotcha' when trying to use VS2008 to work on <a href="http://subtextproject.com">Subtext</a>, which is still a .net 2.0 application. The upgrade went pretty smooth, but I was ham-stringed by the fact that most developers on the project are still using VS2005.

While VS2005 can read VS2008 .csproj files, it can not read VS2008 .sln files. So I couldn't just over write the solution with the upgraded file becase that would have made the solution unusable for all of our devs still running VS2005. Oh, and VS2005 also has trouble reading the project file for a Web Application Project... :)

With a little research and some hacking at the .csproj files I <a title="Multi-Targeting VS2005 and VS2008 Web Application Projects, a Gotcha!" href="stevenharman.net/.../multi-targeting-vs2005-and-vs2008-web-application-projects-a-gotcha.aspx">found a work around</a> that allows us to work on .net 2.0 Web Application Projects in either VS2005 or VS2008 fairly seamlessly. :)

# re: Using VS 2008 to Create New ASP.NET 2.0 with ASP.NET AJAX 1.0 Projects

Friday, January 04, 2008 1:25 PM by Rupak Ganguly

Scott,

   We have been using VS 2005 for .NET 2.0 projects for a long time now and want to use VS 2008 using the multi-targetin feature. The problem I see is that the .sln and .proj file formats in VS 2008 has changed, hence VS2008 wants to upgrade the VS 2005 .NET 2.0 projects. This causes stress for my PMs as all the projects have to be "upgraded". Is there anything I am missing or you can suggest something graceful?

Thanks again.

Rupak Ganguly

Solution Architect, Hewlett Packard.

# re: Using VS 2008 to Create New ASP.NET 2.0 with ASP.NET AJAX 1.0 Projects

Friday, January 04, 2008 10:27 PM by Sambo

Hi Scott,

I just setup Visual Web 2008 Expression Edition but i cannot find "Web Application" project. Do i need setup it separately? Where can i download it?

# re: Using VS 2008 to Create New ASP.NET 2.0 with ASP.NET AJAX 1.0 Projects

Friday, January 04, 2008 11:54 PM by Vikram

Thanks for the post was very helpful

# re: Using VS 2008 to Create New ASP.NET 2.0 with ASP.NET AJAX 1.0 Projects

Saturday, January 05, 2008 4:06 AM by Laurent Bugnion - MVP

Hi Scott,

You forgot to mention that doing WPF in VS2008 (even with .NET 3.0) is such a better experience than in VS2005. Full Intellisense (including for custom types like User Controls, etc...), Cider, Auto-insertion of Event Handlers in the XAML editor, etc...

Happy New Year!

Laurent

# re: Using VS 2008 to Create New ASP.NET 2.0 with ASP.NET AJAX 1.0 Projects

Saturday, January 05, 2008 10:28 AM by Rajesh

Scott,

Thank you for your great post.  

I tried this on VS 2008 Web Developer "Express Edition".  I do not see the drop down to select the .NET version.  Will this work on the "Express edition" ??

# re: Using VS 2008 to Create New ASP.NET 2.0 with ASP.NET AJAX 1.0 Projects

Saturday, January 05, 2008 12:41 PM by ScottGu

Hi Aliyafa,

>>>>>>> This case, is Web deployment Project will work as well (for ASP.NET AJAX 1.0 using Net Framework 2 in VS 2008) ?

Yes - you should be able to use the VS 2008 Web Deployment Project download with a .NET 2.0 ASP.NET AJAX 1.0 project.

Hope this helps,

Scott

# re: Using VS 2008 to Create New ASP.NET 2.0 with ASP.NET AJAX 1.0 Projects

Saturday, January 05, 2008 12:44 PM by ScottGu

Hi Marcos,

>>>>>>>> If I have one asp.net 2.0 project and open it with vs 2008, after this will be possible to re-open the same project using vs 2005?  I'm asking this because the same team could use diferent vs versions to edit asp.net 2.0 projects.

The solution file format between VS 2005 and VS 2008 are different - so you can't share .sln solution files between the two unfortunately.  The project file, however, can be shared between the two - so what you'd need to-do is to create two .sln files (one for VS 2005 and one for VS 2008).  They can point to the same projects.

More details can be found here: blogs.msdn.com/.../how-to-use-solutions-and-projects-between-visual-studio-2005-and-2008.aspx and  dotnetcentral.net/.../122975.aspx

Hope this helps,

Scott

# re: Using VS 2008 to Create New ASP.NET 2.0 with ASP.NET AJAX 1.0 Projects

Saturday, January 05, 2008 12:47 PM by ScottGu

Hi Rupak,

>>>>>>> We have been using VS 2005 for .NET 2.0 projects for a long time now and want to use VS 2008 using the multi-targetin feature. The problem I see is that the .sln and .proj file formats in VS 2008 has changed, hence VS2008 wants to upgrade the VS 2005 .NET 2.0 projects. This causes stress for my PMs as all the projects have to be "upgraded". Is there anything I am missing or you can suggest something graceful?

Here is a blog post that should help a little with this: blogs.msdn.com/.../how-to-use-solutions-and-projects-between-visual-studio-2005-and-2008.aspx

Hope this helps,

Scott

# re: Using VS 2008 to Create New ASP.NET 2.0 with ASP.NET AJAX 1.0 Projects

Saturday, January 05, 2008 12:48 PM by ScottGu

Hi Rajesh,

>>>>>>>>> I tried this on VS 2008 Web Developer "Express Edition".  I do not see the drop down to select the .NET version.  Will this work on the "Express edition" ??

With VS 2008 Web Developer Express you should be able to choose File->New WebSite and then select the AJAX 1.0 template to create a ASP.NET 2.0 w/ AJAX 1.0 web-site.  This should have the right versioning set.

Hope this helps,

Scott

# re: Using VS 2008 to Create New ASP.NET 2.0 with ASP.NET AJAX 1.0 Projects

Saturday, January 05, 2008 12:49 PM by ScottGu

Hi Sambo,

>>>>>>> I just setup Visual Web 2008 Expression Edition but i cannot find "Web Application" project. Do i need setup it separately? Where can i download it?

VWD Express doesn't currently support web application projects.  We are going to be adding that feature in with SP1 however.  For right now, though, you can only use "web site" projects with it.

Hope this helps,

Scott

# re: Using VS 2008 to Create New ASP.NET 2.0 with ASP.NET AJAX 1.0 Projects

Saturday, January 05, 2008 10:24 PM by Sambo

Hi Scott,

>>>>>>> VWD Express doesn't currently support web application projects.  We are going to be adding that feature in with SP1 however.  For right now, though, you can only use "web site" projects with it.

Could you tell me when SP1 release?

Thanks for your help,

Sambo

# 23 Links Today (2008-01-07)

Monday, January 07, 2008 10:24 AM by 23 Links Today (2008-01-07)

Pingback from  23 Links Today (2008-01-07)

# re: Using VS 2008 to Create New ASP.NET 2.0 with ASP.NET AJAX 1.0 Projects

Tuesday, January 08, 2008 3:57 AM by Juan María

Hi Scott:

You can read this post in spanish here:

thinkingindotnet.wordpress.com/.../vs-2008-para-proyectos-aspnet-20-y-ajax-10

# re: Using VS 2008 to Create New ASP.NET 2.0 with ASP.NET AJAX 1.0 Projects

Friday, January 11, 2008 12:01 PM by raditz

what about the webapplications involving sqlserver2005. what is the database edition that ships along with visual studio 2008. what will happen if i try to work on my project written in asp.net2 with sqlserver2005

# VS2008を使用してASP.NET AJAX 1.0 プロジェクトで新しいASP.NET 2.0 を作成

Saturday, January 12, 2008 11:57 PM by Chica's Blog

VS2008を使用してASP.NET AJAX 1.0 プロジェクトで新しいASP.NET 2.0 を作成

# Usando o VS 2008 para criar novos projetos ASP.NET 2.0 com ASP.NET Ajax 1.0

Thursday, January 17, 2008 10:07 PM by Mutamblog

Usando o VS 2008 para criar novos projetos ASP.NET 2.0 com ASP.NET Ajax 1.0

# re: Using VS 2008 to Create New ASP.NET 2.0 with ASP.NET AJAX 1.0 Projects

Saturday, January 19, 2008 1:29 AM by 马小康

could you tell us how to study ASP.NET 2.0 and how to study about you in the school ??

# re: Using VS 2008 to Create New ASP.NET 2.0 with ASP.NET AJAX 1.0 Projects

Wednesday, January 23, 2008 11:40 PM by David Thielen

Hi;

Is there a way to have a single app that can be both an ASP.NET app and a sahrepoint webpart? Preferably the built app but at a minimum, at least the same source code and 2 compiles?

I ask because we have a complete ASP.NET 2.0 app and we have a request to make it a sharepoint webpart.

thanks - dave

# re: Using VS 2008 to Create New ASP.NET 2.0 with ASP.NET AJAX 1.0 Projects

Wednesday, February 20, 2008 4:19 PM by sinc

Has anyone successfully created any ASP.NET 2.0 projects in VWD 2008 Express Edition?  I had no issues with a 3.5 project until I tried to upload it to my web host.  That's when I discovered that they only have the 2.0 frameworks installed, and I cannot run a 3.5 application.  I tried to convert my 3.5 application to a 2.0, but I don't have a clue how to do that.  The web.config file seemed to have to many references to 3.5 for me to fix, with my limited knowledge.  So I'm trying to recreate my web in 2.0.

I have downloaded and installed the items found here (ASP.NET AJAX 1.0 Extensions, ASP.NET 2.0 AJAX Templates).

www.microsoft.com/.../details.aspx

www.microsoft.com/.../details.aspx

But when I try to create a new website and select the new template, I see this info:

Web site with ASP.NET 2.0 AJAX Extensions 1.0 features enabled (.NET Framework 3.5)

This seems to be related to the fact that we cannot select the target framework when creating a project in VWD Express Edition.  But if I ignore that message, and go ahead and create the new web, it looks OK in VWD, but when I try to do a preview in the web browser, most of my master page stuff is missing.  The text comes through, but none of the images or anything, not even the page background color.

If I create a web page using .NET 2.0, do I need

# re: Using VS 2008 to Create New ASP.NET 2.0 with ASP.NET AJAX 1.0 Projects

Wednesday, February 27, 2008 8:24 AM by Richard Cannock

Hi Scott,

We have an asp.net Web Site Project (Framework version 2.0) project that i've upgraded to target asp.net 3.5.

When upgrading the site, i dumped the existing web config, and took a new one from a brand new 3.5 web site project. I then merged back our custom config settins into that.

Application runs fine locally but when shipped to a remote machine, i get the following error:

Microsoft JScript runtime error: 'Sys' is undefined

.NET framework 3.5 has been installed on this machine.

We're ultimately running in an different domain in an iframe on the remote machine, and previously we had applied the old workaround for the iframe cross domain issue that existed in the asp.net ajax 1.0 release, but i believe that had been fixed in 3.5, hence i removed the workaround.

Any ideas, as i am completely stumped now. Most of the posts around Sys is undefined, relate to Asp.net ajax 1.0 for the .NET framework 2.0.

Cheers

Rich

you can p.m. me at [email protected] if needsbe.

# Autentisering mot ASP.NET Membership-tjänst från Silverlight

Friday, June 13, 2008 5:37 PM by Robert Folkesson

EDIT: la till länkar till live-tester av demos samt en länk till ASP.NET AJAX-dokumentationen. Ett scenario

# Effexor serious side effects.

Thursday, July 10, 2008 9:43 AM by Effexor xr.

Effexor. Effexor withdrawal.