Using VS2008 to Target .NET Framework 2.0 with ASP.NET AJAX


As I mentioned last month, VS 2008 fully supports building applications for .NET Framework 2.0…   This is very important as it will take time for some hosters and IT organizations to fully deploy .NET Framework 3.5, but you don’t want that to block you from taking full advantage of the cool features in VS 2008

Today we released ASP.NET 2.0 AJAX Templates for VS2008.  This release contains project templates for using Visual Studio 2008 or Visual Web Developer 2008 to create new web sites and web applications with ASP.NET AJAX Extensions features. The project templates contain specific references to assemblies in .NET Framework 2.0 and ASP.NET 2.0 AJAX Extensions 1.0.

Download the ASP.NET 2.0 AJAX Templates for VS2008!

To try these out, make sure you have ASP.NET AJAX Extensions installed, then install the ASP.NET AJAX Templates for Visual Studio 2008.  

Then, go to File->New Project and select .NET Framework 2.0 as the target runtime.  That will filter down the options and you should see “AJAX 1.0-Enabled ASP.NET 2.0 Web Application”.  Select it.

 

image

 

Notice the assembly reference in web.config is fixed up to be the 1.0 version number…

 <system.web>
    <pages>
      <controls>
        <add tagPrefix="asp" namespace="System.Web.UI" 
             assembly="System.Web.Extensions, Version=1.0.61025.0, ...
</controls> </pages>

Now you are all set up to get the power of developing with VS 2008, but target .NET Framework 2.0.

Please let me know if you have any questions or comments.

 

Speaking of VS 2008 enhancements for Web Developers, I also encourage you to check out the Web Deployment Project release for VS2008..  Web Deployment Projects (WDP) for Visual Studio 2008 – December 2007 CTP Released

thanks!

Comments (12)

  1. Shail says:

    Hello Brad,

    Thanks for a nice post.

    My question is, I have a solution developed in VS 2005 (.NET 2.0 ). it has 3 web sites and 2 class library project.

    That solution is also source controlled with VSS 2005.

    Now when I open this project in VS 2008, it starts the migration wizard. and if I completes that wizard and check in, other developers in my team are not able to

    open that in their VS 2005. I am the only one who is using VS 2008. As I am Solution Architect in team, I need to open all portions of the solution.

    How can I skip that Wizard and still open the VS 2005 project in VS 2008 and traget .NET 2.0.

    Thank you

  2. Brad,

    I’m facing the same challenge as Shail. Any advice would be appreciated. Thanks in advance,

    -Mark

  3. LA.NET [EN] says:

    Brad Abrams has announced new templates for targeting ASP.NET 2.0 from Visual Studio 2008 .

  4. Stuart says:

    @Shail:

    Before you open up your solution in VS2008, make a copy of the .sln file and append a "_2008" or something to it. So now you have 2 solution files that contain the same stuff. Open the new solution and let VS2008 migrate that one only. So now you can open your project in VS2005 and VS2008 with diff .sln files. Everyone is happy.

  5. Shail–

    I ran into the same issue the day VS2008 was launched and ScottGu pointed me to a couple of resources.  Here’s the link to his comments.

    http://weblogs.asp.net/scottgu/archive/2007/11/19/visual-studio-2008-and-net-3-5-released.aspx#5288996

    Basically you’ll need a separate solution file for VS2008.  I just copied the VS2005 and edited the .sln file to change the version number and product name to match VS2008 (that’s the only thing the conversion wizard did).  It also adds a ToolsVersion attribute to the project files, but you should still be able to open them with VS2005.  Worked for me.

  6. Microsoft released recently templates for VS 2008 that you can use to create websites or applications

  7. JesseZhao says:

    前段时间想做个博客系统,用着vs2008很顺手,所有准备在上面开发。在选择JS框架的时候看重了asp.netajax,但是后来查阅资料,发现vs2008下面开发的asp.netajax程序在.n…

  8. ASPInsiders says:

    Brad Abrams has announced new templates for targeting ASP.NET 2.0 from Visual Studio 2008 .

  9. sara says:

    i want to convert my framework version from 3.5 to 2.0