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

23 Comments

  • hi scott,

    Thank you for the information.

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

  • 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

  • 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!)

  • 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

  • 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

  • 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 :)

  • 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

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

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

  • 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.

  • Ql, solved my problem :)

  • 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?

  • Thanks for the post was very helpful

  • 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

  • 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" ??

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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 richard.cannock@assureweb.co.uk if needsbe.

Comments have been disabled for this content.