VS 2005 Web Application Project Release Candidate Now Available

May 8th Update: The final release of the VS 2005 Web Application Project is now live.  You can learn more about it here.

Today we published the Release Candidate of the VS 2005 Web Application Project on the web.  You can download it now from here. 

 

Over the next few days we’ll be updating the in-depth tutorials on how to use it on http://webproject.scottgu.com.  We have also posted a whitepaper that describes the project option more (and when to use it versus a VS 2005 Web Site Project) hereYou can also read more about the original motivation for adding the VS 2005 Web Application Project option here.

 

There is also a new forum on http://forums.asp.net that is dedicated to VS 2005 Web Application Project questions.  You can access it here.

 

What is new with today’s release?

 

Today’s release is a major refresh that provides a ton of new functionality and rounds out the feature-set.  Some of the major new features added since the February preview:

  • Event handler generation and wire-up from the WYSIWYG designer    
  • F7/Shift-F7 Navigation Support (switch between page views)
  • Add New Item Wizard to add pages based on Master Pages (easily pick master)
  • Richer Publishing Support
  • Connection String and Settings Support in Web.Config
  • Resources and .Resx Resource Editor Support
  • Support for building multi-project applications and sub-web projects
  • .ASPX files no longer locked when debugging
  • Support for root-path based image and stylesheets (/images/foo.jpg)
  • Control Registrations within Web.Config files
  • Web Service Cross-Project Reference Support
  • Section 508 and WCAG Accessibility Checker Support
  • Ability to create an IIS Vroot/Application setting within Project Dialog
  • SQL DataSource Control Support
  • ASP.NET Custom Folder Templates
  • Component Designer Support
  • Support to Drag/Drop User Controls, StyleSheets, Images from Solution Explorer to designer
  • New Web Service Project Template
  • SQL Express Support

Also included in this build is support to automatically migrate a VS 2003 Web Application to be a VS 2005 Web Application Project.  With the VS 2005 Web Application Project installed, you can now simply do a File->Open File within VS 2005 and select a VS 2003 .sln or  project file to kick off a migration wizard that will convert the project to be VS 2005 Web Application Project (no need to open or modify any project file settings manually anymore). 

 

This will provide a straight-forward way to migrate a VS 2003 Web Application to VS 2005 without having to-do much work (because this new project type uses the same compile and project semantics as VS 2003 you shouldn’t need to make code changes to get a VS 2003 app building and running in VS 2005 – we’ll be posting a detailed step-by-step tutorial on how to-do this shortly). 

 

We also have added automated migration support to help take a VS 2005 Web Site Project and migrate it to the VS 2005 Web Application Project option you can do that too (we’ll also be publishing tutorials on this as well).

 

If you have installed and used the previous two preview releases of the VS 2005 Web Application Project, you can simply uninstall the previous installs and install this new one.  The project file format and code is the same, so your apps will keep working (but now with more features to use).

 

Quick Step-By-Step Walkthrough

 

To get a quick sense of how VS 2005 Web Application Projects work, you can install it and try out the simple “hello world” walkthrough below:

 

Step 1: Create a New VS 2005 Web Application Project

 

Choose the File->New Project menu item and select the “ASP.NET Web Application” project template (note below that we also now have an ASP.NET Web Service project template if you are building a web service project).

 

 

This will create a project that contains a default.aspx page (along with associated code-behind file, and a .designer.cs/.vb file where control field declarations and tool-generated code is persisted):

 

 

Note that I didn’t have to associate this project with an IIS application.  Unlike VS 2003, I don’t need to have IIS on the machine – instead developers can use the built-in VS web-server if they want to instead.  Alternatively, they can open up the project properties to map (or create) an IIS application to handle the project (see step 5 below on how to-do this). 

 

Step 2: Open and Edit the Default.aspx Page

 

Double click on the default.aspx page node in the solution explorer to open and edit it (note: you can now use F7 and Shift-F7 to toggle between the designer, .aspx source, and code-behind views of the page).  Add a button and label to the page:

 

 

This generates .aspx markup source like so:

 

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication4._Default" %>

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

 

<html xmlns="http://www.w3.org/1999/xhtml" >

<head runat="server">

    <title>Untitled Page</title>

</head>

<body>

    <form id="form1" runat="server">

    <div>

 

        <asp:Button ID="Button1" runat="server" Text="Push Me!" />

       

        <br />

        <br />

       

        <asp:Label ID="Label1" runat="server"></asp:Label>

       

    </div>

    </form>

</body>

</html>

 

Within the WYSIWYG designer, double click on the button control to generate a “Click” event handler.  This will automatically generate the appropriate event-handler in your code-behind and wire it up to the control. Within your code-behind file you can then write your code to work against the controls on the page:

 

using System;

using System.Data;

using System.Configuration;

using System.Collections;

using System.Web;

using System.Web.Security;

using System.Web.UI;

using System.Web.UI.WebControls;

using System.Web.UI.WebControls.WebParts;

using System.Web.UI.HtmlControls;

 

namespace WebApplication4

{

    public partial class _Default : System.Web.UI.Page

    {

        protected void Button1_Click(object sender, EventArgs e)

        {

            Label1.Text = "Built using the VS 2005 Web Application Project!";

        }

    }

}

 

The code above is actually the exact same code-behind code that you would write with a VS 2005 Web Site Project based application.  The difference is that with a VS 2005 Web Site Project the control declarations are dynamically generated by the project at compile time (rather than persisted in the project) within a partial class that is compiled together with the code-behind file.  With VS 2005 Web Application Projects each page instead has a .designer.cs file (or with VB projects .designer.vb file) that contains the persisted control declarations within a partial class.  This is updated by VS anytime you modify the .aspx page.  For example, the Default.aspx.designer.cs file for our above sample would look like this:

 

namespace WebApplication4 {

   

    public partial class _Default {

        protected System.Web.UI.HtmlControls.HtmlForm form1;

        protected System.Web.UI.WebControls.Button Button1;

        protected System.Web.UI.WebControls.Label Label1;

    }

}

 

Persisting these declarations within .designer.cs files within the project allows very fast compile times (in general people in the beta program have found VS 2005 Web Applications compile 10-15% faster than VS 2003 Web Projects, and much, much faster than VS 2005 Web Site Projects when a full build/re-build scenario occurs).  It also allows any class within the project (or a separate project that references your web project) to directly reference and use a page and its controls if you want to.  It also makes code refactoring very fast even for very large projects.

 

If you want, you can also optionally declare your controls manually within your code-behind file (for example: if you wanted to add a custom attribute to them or define a custom type to use).  If VS detects that a control declaration has already been made in the code-behind file by you, then it will automatically omit duplicating it from the .designer.cs/.vb file (which is a nice, useful feature).

 

Step 3: Build the Project

 

When you build the web-site, all code and pages within the project will be compiled into a single project assembly (like VS 2003 did).  This assembly will be persisted in the \bin directory of the web project.  You can see this by doing a build, and then clicking the “Show All Files” solution explorer icon to see files on disk that are not part of the project:

 

 

Note that only files and directories specifically added to a VS 2005 Web Application Project file get added to the application and project view.  This makes it easy to have files on disk underneath a web project root and not have them show up in the solution explorer or be included in a build or publish step.

 

Step 4: Run the Project

 

Set a breakpoint on the button click event handler, and then hit F5 to run the application.  Because we haven’t yet associated this project with an IIS application, it will by default launch the built-in VS web-server to run it:

 

 

I can then obviously hit breakpoints and debug the application:

 

 

Step 5: Customize Project Properties

 

Double-click on the “Properties” node in the Solution Explorer to bring up the project properties window.  This provides the same options as standard VS 2005 class libraries and Windows Forms projects (for example: assembly name, versioning, code signing, code analysis, resources, etc).  It also then adds an additional “Web” property tab for web-specific settings:

 

 

Within this tab you can customize a bunch of launch options for the project, as well as control whether it uses the built-in VS web-server or IIS to run the application (note: all settings are persisted in the project’s .csproj or .vbproj file).

 

To map the application to use IIS instead, you can either use the IIS admin tool to create your application to point to your directory, or with this new VS 2005 Web Application Release simply specify a new virtual directory/application to create and click the “Create virtual directory” button within the “web” property tab.  This will create and associate it for you automatically with IIS.

 

For example, in the above properties dialog I chose to map the application to a new http://localhost/WebApplication4/ IIS application.  I clicked the “Create virtual directory” button to setup this mapping to my new project.  And now when I next run the application it will use IIS:

 

 

Step 6: Publishing the Project

 

To publish a VS 2005 Web Application to a remote server (or just another directory on your local system), select the Build->Publish menu item.  This brings up a publish dialog that provides support for many new publishing options:

 

 

If you click on the “…” button in the publish dialog you can configure the publish location path you want to use.  VS 2005 Web Application Projects support several options:

 

 

File System – Deploy the application to a local or remote UNC share

IIS – Deploy the application to a local IIS web application

FTP – Deploy the application to a FTP based location

Remote Site – Deploy using FrontPage Server Extensions over HTTP to a local or remote server (also includes the ability to create a new remote site using FPSE)

 

VS 2005 Web Applications also support multiple file deploy modes – including both clean replacement (where the target directory is deleted and then recreated) as well as incremental copies (where only modified files are copied over).  The incremental approach is ideal for cases where you only make a change to 1 or more pages, and simply want to copy the changed .aspx files and single .dll assembly.

 

For more advanced deployment options, you can also optionally associate a VS 2005 Web Deployment Project with a VS 2005 Web Application Project (VS 2005 Web Deployment Projects work with both Web Site and Web Application Projects).  We will be shipping the final released build of the VS 2005 Web Deployment Project download in a few days. 

 

Next Steps

 

We’ve had about 150 private beta testers who have been testing out VS 2005 Web Application Project builds the last few months, and have provided great feedback on features to add and bugs to fix.  Their feedback has been invaluable and has really helped shape the feature-set and direction of the project.

 

We are calling this week’s download a “Release Candidate” because we expect to see a few last minute feature requests and bug reports once thousands more people start using it.  Our plan is to spend the rest of this month responding to these, and then publish the final build on the web.  We are then working to also add VS 2005 Web Application Support directly into VS 2005 SP1 (but we wanted to make it available as a web download now before then). 

 

I’ve received a few questions from people about our web project model plans going forward.  To quickly summarize a few of the common answers:

 

-- We will be fully supporting both the VS 2005 Web Site and VS 2005 Web Application Project Model going forward.  Both will be fully supported in the next release of Visual Studio.  So both are “safe” bets to use going forward to build new projects.

 

-- Deciding which project model option to use really depends on your particular preference in terms of development style, your team dynamics, and the size and requirements of the project.  There is no “right” or “wrong” project option to use (just like language preferences, while people might be passionate about a particular choice, it really depends on you and your background as to which is better for your scenario).  We have published an initial whitepaper here that provides guidance on the scenarios and the pros/cons of each model to help you decide.

 

-- This new project option isn’t just about making upgrades of large VS 2003 Web Projects easier.  It is also ideal for a lot of new projects that have rich enterprise scenarios/requirements.

 

Hope this helps,

 

Scott

Published Wednesday, April 05, 2006 5:46 PM by ScottGu
Filed under: ,

Comments

# re: VS 2005 Web Application Project Release Candidate Now Available

Wednesday, April 05, 2006 9:01 PM by JC
Wow great! I was actually reading "Upcoming ASP.NET Releases in April" at this same page and wondering if I should continue to work with the preview install or hold off and wait for this. Then I refreshed the page and wham! Great timing for me, thanks!

# re: VS 2005 Web Application Project Release Candidate Now Available

Wednesday, April 05, 2006 9:07 PM by Dave Reed
Excellent! One question though. We currently have C# "Library" projects that have web user controls in them. We use them to create user controls are plugged into a seperate web application (which is a regular asp.net web application project).

It's great that we can convert a web application project from VS2003 to VS2005, but can we easily convert a VS2003 Library project into a VS2005 Web Application project? Because that is what we would have to do for these ASCX-containing library projects (for the record, they aren't web projects, because we test/deploy them in the other web application, so making them a web project just caused problems).

# re: VS 2005 Web Application Project Release Candidate Now Available

Wednesday, April 05, 2006 9:19 PM by Tom
Waiting for RTM...
Thank you, guys!

# re: VS 2005 Web Application Project Release Candidate Now Available

Wednesday, April 05, 2006 9:31 PM by Elton
I am using Chinese version VS2005, I can't install "Microsoft Visual Studio 2005 – Update to Support Web Application Projects" . Is it only for English version? So sad I can't use the lasted Web Application Project.

# re: VS 2005 Web Application Project Release Candidate Now Available

Wednesday, April 05, 2006 9:36 PM by Matt T
So I'm still a little confused between the this new Web Application Project RC and the existing Web Site Project template in VS2005. Is there a link to some resource explaining which one to use. Does this work with Atlas? Which one should I be using if I am building a new web site?

Thanks

Matt

# re: VS 2005 Web Application Project Release Candidate Now Available

Wednesday, April 05, 2006 9:50 PM by Stacy
Is there a way to auto convert a 2005 Web Site Project to a 2005 Web Application Project?

# re: VS 2005 Web Application Project Release Candidate Now Available

Wednesday, April 05, 2006 9:54 PM by Stacy
I just read that you can. Sorry for asking :)

# re: VS 2005 Web Application Project Release Candidate Now Available

Wednesday, April 05, 2006 10:28 PM by Brian Goldfarb
Matt T: check out this detailed article that covers when to use Web Application Projects (WAP) and when to use Web Site Projects (WSP)

Both project systems work with Atlas.

As for what to use for a new site, it depends on what your requirements are -- read the article, should clarify a lot

http://msdn.microsoft.com/vstudio/default.aspx?pull=/library/en-us/dnvs05/html/WAP.asp

Hope this helps!

-Brian

# re: VS 2005 Web Application Project Release Candidate Now Available

Thursday, April 06, 2006 12:41 AM by Khurram
Cool!

In my solution, i have web application project; referencing "user control project" which is refernecing a "library project" which has reference to other libaries like enterprise library. I am using WAP-CTP; the problem is; the library project and its referenced libaries doesnt appear in web application's "bin" folder; i have to copy them manually (written copy statements in user control project's post build events; along with copying ascx files to web-app)

Will try this RC; and update you if that problem is still unresolved.

# re: VS 2005 Web Application Project Release Candidate Now Available

Thursday, April 06, 2006 12:53 AM by Tyler Carver
I know I'm always complaining and wanting more, but props to you Scott for getting this done. I love it!!

# re: VS 2005 Web Application Project Release Candidate Now Available

Thursday, April 06, 2006 12:56 AM by Lynn
Scott I have been using the Web Aplications B2 and Web Deployments B2 projects together on a ported VS2003 project. When running the Web Deployment build, the code behind asembly for the Web Application project is not compiled in to the Web Deployment single assembly. Is this option going to be available at any point?

# re: VS 2005 Web Application Project Release Candidate Now Available

Thursday, April 06, 2006 1:11 AM by Jeff Handley
Scott,

THANKS!!! I am very very glad that you guys are building this option for us and that it will be baked into future released of VS.NET (and supported)!

The project I'm on had zero chance of migrating to ASP.NET 2.0 with the Web Site Project semantics. It would've been a 600+ screen application restructure to migrate... and that would've been a long way's out. This should enable us to migrate much much sooner.

Thanks again,
Jeff Handley

# re: VS 2005 Web Application Project Release Candidate Now Available

Thursday, April 06, 2006 1:16 AM by Jon Yutzy
I sent you an email at devconnections and you said Omar was working on a whitepaper. Wholla, it's been published and the Release Candidate of WAP made available two days later. You guys are great! The whitepaper clears us my confusion on when to use the WAP or WSM model.

Thanks!

# re: VS 2005 Web Application Project Release Candidate Now Available

Thursday, April 06, 2006 2:00 AM by Arno Nel
Thanks dude :)

# re: VS 2005 Web Application Project Release Candidate Now Available

Thursday, April 06, 2006 3:01 AM by Chris van Sluijsveld
w00t. You rock!

# re: VS 2005 Web Application Project Release Candidate Now Available

Thursday, April 06, 2006 3:03 AM by scottgu
Hi Dave,

Yep -- you can convert VS 2003 class library projects to be VS 2005 Web Application Projects too. Probably the easiest way is to migrate them to be VS 2005 class library projects, and then open up their project files and change the projectype GUID to match the one you see when you create a new web application project. Then, when you open up the project again, the project type will be a VS 2005 Web Application Project.

Hope this helps,

Scott

# re: VS 2005 Web Application Project Release Candidate Now Available

Thursday, April 06, 2006 3:04 AM by scottgu
Hi Elton,

We are working on releasing localized versions of the patch now. I don't have a final ETA on the languages yet -- but it is definitely in the works.

Thanks,

Scott

# re: VS 2005 Web Application Project Release Candidate Now Available

Thursday, April 06, 2006 3:05 AM by scottgu
Hi Lynn,

Can you send me an email (scottgu@microsoft.com) with more details on your scenario? I'm not sure I understand it 100%.

Thanks,

Scott

# re: VS 2005 Web Application Project Release Candidate Now Available

Thursday, April 06, 2006 5:06 AM by David
Please, make autoeventwireup="false" the default setting and have it auto-generate a new event in the xxx.aspx.designer.cs like VS2003 style. It blows to do this by hand as it is now.

override protected void OnInit(EventArgs e)
{
InitializeComponent();
base.OnInit(e);
}

private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);
this.Button1.Click += new System.EventHandler(this.Button1_Click);
}

# Big Problem

Thursday, April 06, 2006 6:28 AM by Ekkehard Preis
Hi, after installing RC1 I got a rather big problem with vs2005. I cannot drop any usercontrols (self programmed or bought) onto the designer. VS only tells me: "control cannot be created because Visual studio cannot find the control's type in the control assembly" what is rather sensless. The controls itself are functional when running the project...

UserControl already present in the Page are not rendered correctly in the Designer, there the error is unkown server tag (although the server tags are registered correctly).

Anyone having an idea?


thanks,

ekke
Ps: Nevertheless, great project could not live without it...

# re: VS 2005 Web Application Project Release Candidate Now Available

Thursday, April 06, 2006 8:21 AM by Spoosh
Scott,

I just wanted to thank you and the team for all of the hard work you guys have put into this. I can't wait to start using it and keep up the good work.

# re: VS 2005 Web Application Project Release Candidate Now Available

Thursday, April 06, 2006 8:55 AM by David Travis
Hi Scott,

I am very happy to read about this release. I think it missing and I am sure it will be a very popular patch for the VS2005. Keep on the good work!

Now business...

I went through the tutorials in the dedicated website (one by one like a good kid) and eventually tried to migrate a very simple website I recently developed using WSM. I also used Atlas in it.

I had some compilation errors after the whole procedure, which I managed to overcome. One important thing I had to deal with was the fact the the "Convert to web application" did not handle was Atlas controls. All pages using these controls were not parsed and I had to generate the ".designer.cs" files myself for them. Other then that it was pretty ok.

There are two issues I want to discuss regaring Profile:

1. In the tutorial it is mentioned that if the WSM application uses Profile, than I should create the ProfileCommon class myself (auto-generated in WSM). I am not sure whether the provided sample in the tutorial is correct. As I understand the ProfileCommon should extend ProfileBase. The sample code does not extend it.

2. After making the whole Profile thing compile (extending ProfileBase and adding the Profile declaration in wach code-behind file that uses the Profile) I managed to run the site. But when I reached a page which uses Profile I got an error:
The type 'college_Details' already contains a definition for 'Profile'.

Source Error:
Line 14: public partial class college_Details : System.Web.UI.Page {
Line 15:
Line 16: ProfileCommon Profile = new ProfileCommon();

WOW... this was long...

I would be happy to read your reply.

Thanks,
David.

# re: VS 2005 Web Application Project Release Candidate Now Available

Thursday, April 06, 2006 9:04 AM by Glyn Simpson
Hi Scott - any plans for having the facility to remove items on a remote host (rather than just the options to delete and recopy, or add new files)? Or does it detect local deletions already and process these on the remote site?

Where I could see this useful is if a file is deleted in App_Code. If this happens, only by deleting the whole project on the remote site and republishing can it be removed. If it isn't removed this way, you may get errors on the remote host.


Glyn

# re: VS 2005 Web Application Project Release Candidate Now Available

Thursday, April 06, 2006 9:22 AM by Tristan
Hi Scott,

Apologies for the previous post - I just figured out that I could still do what I wanted by creating a new Blank Solution and adding my WAP to it. :)

I do, however, have a more meaningful question: Is it possible to avoid the debugger stepping through the entire compilation process for an ASCX file (or ASPX for that matter)?

Imagine a scenario wherein you programmatically create an instance of a web user control [which has a label and textbox on its ascx part, and some Page_Load code in its code-behind) using this.LoadControl(...)] in the code-behind of an ASPX page. When I set a break point in the ASPX's code-behind before debugging, then step through the application, it takes a total of 13 steps (in this instance) to get past the ASCX and its controls and into its code-behind.

I have to admit to being a bit green when it comes to VS2005, so apologies if it's already possible to overcome this problem; if it isn't, I believe this may become something of a must-have, especially as the complexity / number of such controls increases.


Many thanks,

Tristan

# re: VS 2005 Web Application Project Release Candidate Now Available

Thursday, April 06, 2006 9:38 AM by Chris C
Hi Scott,

Your new tutorial on WAP is cool. The only bit I was disappointed about was the lack of Profile support (needing to manually do a wrapper ProfileCommon class). I figured I'd prefer static methods for this so I can use it anywhere in my code (at least anywhere HttpContext.Current would work). I've a couple questions though:

- Will the existing <asp:ProfileParameter> work still, or did it depend on the current page/control having a Profile member?

- Why does the WSP implementation create a Profile member variable instead of making a static available? Is this connected to the 'run any page even if others have errors' scenario WSP supports? Is my statics suggestion even any good?

- If the static suggestion doesn't suck, would it be possible to auto-generate a static Profile class in the WAP RTM or VS SP1, similar to how the current ProfileCommon class is generated?

Thanks!

Chris C

# re: VS 2005 Web Application Project Release Candidate Now Available

Thursday, April 06, 2006 10:25 AM by Roger
Scott,

Namespaces are back! Everyone on my team will be very happy to hear this. This was always a difficult sell for the built-in web projects.

A couple of questions:

Do you feel it is safe to put projects into production using this, or could there be difficulties converting to the RTM?

Can XML documentation be generated from these projects, and would the compiler produce warnings when you don't document anything that is public?

Hopefully I'll get to play with this sometime this week so I'll let you know how it turns out for my projects.

Thanks,
Roger

P.S. Good meeting you again at the ASP.NET Conference, thanks for staying to help me with my sitenav questions.

# re: VS 2005 Web Application Project Release Candidate Now Available

Thursday, April 06, 2006 11:06 AM by Bob McCreedy
How do I migrate an existing VS 2005 website to a Web Application Project now? I see you mentioned a tutorial, but I don't see one and am not sure how to start.

# re: VS 2005 Web Application Project Release Candidate Now Available

Thursday, April 06, 2006 11:37 AM by Andy McGoldrick
Hi Scott,

does the code generated by VS 2005 when using the Web Application Project compile under .Net 1.1 Framework?

We are starting a new application but need to contain ourselves to 1.1 compatible code and we looking to use VS 2005 and MSBee.

Thanks,

Andy

# re: VS 2005 Web Application Project Release Candidate Now Available

Thursday, April 06, 2006 11:51 AM by Fredt
This release makes me encounter a new error message underlining the whole <%@ Page%> declaration :
"Error 21 C:\Data\Projet.NET2\Company\WebSite\mySolution\Net\SubProject\myPage.aspx: ASP.NET runtime error: There is no build provider registered for the extension ''. You can register one in the <compilation><buildProviders> section in machine.config or web.config. Make sure is has a BuildProviderAppliesToAttribute attribute which includes the value 'Web' or 'All'."

Any ideas ?

For info, my solution holds several aspx projects but only one is the main one with web.config inside and the others are in excluded subfolders.

# re: VS 2005 Web Application Project Release Candidate Now Available

Thursday, April 06, 2006 12:36 PM by Kevin
Hello. I'm not clear what you mean by "Support for building multi-project applications and sub-web projects". Are "sub-web projects" the same as "User Control Libraries" (as described in Tutorial 6). Or, is this something different? Thanks!

# re: VS 2005 Web Application Project Release Candidate Now Available

Thursday, April 06, 2006 1:19 PM by Mahesh
Scott,

I am confused. What is the difference between this and the Web Deployment Project?

TIA,

Mahesh

# What will be missing in Web App Projects?

Thursday, April 06, 2006 1:25 PM by soccerdad
Scott,

I'm really excited about being able to move to web app projects. However, when I see the list of features you've added and what situations they resolve, I start to get nervous about whether there are things that I'll be implicitly losing which I currently use via web site projects.

For example, you listed "SQL DataSource Control Support" as a newly-added feature in the RC. If that wasn't supported in previous web app project releases, how did you work with SQL Data Source controls in those kinds of projects? Did designer support for setting data source properties and corresponding data-bound controls (e.g. GridView) not work in those releases? Since you didn't mention Object Data Source, is that not supported in the RC?

I've spent time over the last couple of weeks writing an admin app for one of our systems. I'm using many of the techniques that you covered in your recent Atlas tutorial video (object data source, gridview, detailsview, etc.) so that I get a better feel for some of the areas of VS2005 and ASP.NET 2.0 that I haven't yet worked with. Will those techniques not work with web app projects? Could you not have done your tutorial as a web app project?

I hope these questions make sense. Thanks for your efforts!

Donnie

# re: VS 2005 Web Application Project Release Candidate Now Available

Thursday, April 06, 2006 1:28 PM by scottgu
Hi Ekkehard,

I'm not seeing this issue when trying it out. Can you send me an email (scottgu@microsoft.com) with more details and we can loop some poeple in to investigate?

Thanks,

Scott

# re: VS 2005 Web Application Project Release Candidate Now Available

Thursday, April 06, 2006 1:32 PM by scottgu
Hi David,

Can you send me a simple sample with your profile code (scottgu@microsoft.com)? I can then take a look and figure out what the issue is.

Thanks,

Scott

# re: VS 2005 Web Application Project Release Candidate Now Available

Thursday, April 06, 2006 2:05 PM by scottgu
Hi Glyn,

You can use the "Copy Web" utility within VS 2005 to open up and delete or move individual files on a remote site. The publish web dialog then has the ability to nuke and re-do everything, or to just to incremental add/update changes.

Note that with VS 2005 Web Application Projects you don't actually publish the app_code directory -- since with this model the classes are all compiled into a project assembly and that is in turn published. So for app_code you don't need to worry (since there isn't one).

Hope this helps,

Scott

# re: VS 2005 Web Application Project Release Candidate Now Available

Thursday, April 06, 2006 2:07 PM by scottgu
Hi Tristan,

When you debug you can set multiple breakpoints, and so probably the easiest way to-do what you are after is to just hit "f5" to continue after the first breakpoint to jump to the next one. That way you don't need to step line by line through each operation.

Hope this helps,

Scott

# re: VS 2005 Web Application Project Release Candidate Now Available

Thursday, April 06, 2006 2:08 PM by scottgu
Hi Chris,

We are looking at possibly adding the strongly-typed Profile generation into the final release of WAP. For the release candidate, though, you need to manually create the Profile object.

Note that the <asp:ProfileParameter> works already -- so that is unchanged by WAP.

Hope this helps,

Scott

# re: VS 2005 Web Application Project Release Candidate Now Available

Thursday, April 06, 2006 2:09 PM by James O.
Thank you for this! The first thing I attempted when I received VS 2005 was to convert a large 1.1 project to 2.0. I have to admit that it was a letdown. But, with this release, I am throughly impressed with how you have your finger on the pulse of ASP.NET development. With this and your exciting presentations in Orlando, I can't wait to fully transition to 2.0. (Thanks for building your demos from scratch in a live situation!)

# re: VS 2005 Web Application Project Release Candidate Now Available

Thursday, April 06, 2006 2:10 PM by scottgu
Hi Roger,

The applications that are built with WAP use the standard ASP.NET and .NET Framework binaries -- so there aren't any issues with putting apps built with it into production. There also shouldn't be any issues upgrading to the final release of WAP with it (since the project file and code generation format will stay the same).

XML Documentation is also fully possibly with Web Application Projects.

Hope this helps,

Scott

# re: VS 2005 Web Application Project Release Candidate Now Available

Thursday, April 06, 2006 2:11 PM by scottgu
Hi Bob,

If you go to the http://webproject.scottgu.com site there are both VB and C# tutorials on how to migrate an existing VS 2005 Web Site Project to use the VS 2005 Web Application Project model.

Hope this helps,

Scott

# re: VS 2005 Web Application Project Release Candidate Now Available

Thursday, April 06, 2006 2:15 PM by Darrell
I installed both updates and they went just fine. After a reboot, I still don't see the updated project properties screen or publish screen as you have in your blog. Any idea what I can check? I've been uninstalling/reinstalling all afternoon trying to get these to work!

Thanks.

# re: VS 2005 Web Application Project Release Candidate Now Available

Thursday, April 06, 2006 2:51 PM by Roger
Scott,

I do see that XML documentation is supported; that alone is a major selling point!

There is one bad thing I noticed though, and that is when you create a connection string in the Settings.settings file for the project, it has to be added to the web.config using the syntax: [appname].Properties.Settings.[connstring].

This is a problem because DataSets in class libraries use this settings file, and don't go against the web.config directly. I see this behavior also applies to WAP.

I did find a workaround to this by writing custom code in the partial class of the settings file. I blogged about this in detail because I had so many questions from my team regarding this:

http://blogs.dev.bayshoresolutions.com/roger/archive/2006/04/06/3974.aspx

I hope you could point me in the direction of a workaround for this behavior, but I believe this is present because of the inherient nature of settings files.

Maybe there is an undocumented way to point a DataSet in a Class Library/WAP directly against a web.config value?

Roger

# re: VS 2005 Web Application Project Release Candidate Now Available

Thursday, April 06, 2006 4:35 PM by scottgu
Hi Andy,

In theory you should be able to use MSBee for targetting 1.1 with VS 2005 Web Application Projects -- although I haven't tried it myself.

One thing to watch out for is that you don't want to use partial classes in the project, since that isn't supported by 1.1 compilers. But if you avoid this and are careful elsewhere it should in theory work.

Hope this helps,

Scott

# re: VS 2005 Web Application Project Release Candidate Now Available

Thursday, April 06, 2006 4:36 PM by scottgu
Hi FredT,

Can you send me an email (scottgu@microsoft.com) with more details on this? I can then help debug it and figure out what is going on.

Thanks,

Scott

# re: VS 2005 Web Application Project Release Candidate Now Available

Thursday, April 06, 2006 4:37 PM by scottgu
Hi Kevin,

I am planning on writing up a blog post on the sub-project/multi-project idea. It is different from user-control libraries, and actually allows you to have multiple projects working within the same application.

Thanks,

Scott

# re: VS 2005 Web Application Project Release Candidate Now Available

Thursday, April 06, 2006 4:38 PM by Bob McCreedy
Hey Scott,

Thanks for the response. I did see that tutorial but it sounded like the latest release had some more "integrated" functionality that would eliminate some of the manual stuff. Maybe I misunderstood.

Bob

# re: VS 2005 Web Application Project Release Candidate Now Available

Thursday, April 06, 2006 4:38 PM by scottgu
Hi Mahesh,

Web Deployment Projects provide a post-build way to update connection-strings, perform full compilation of .aspx pages, and do other actions. They can be used with both Web Site and Web Application Projects.

Hope this helps,

Scott

# re: VS 2005 Web Application Project Release Candidate Now Available

Thursday, April 06, 2006 6:16 PM by scottgu
Hi Donnie (aka Soccerdad <g>),

You can actually use all features of ASP.NET with Web Applications project. We had a bug with the previous WAP preview where the SQLDataSource control was sometimes flaky at design-time -- but that was fixed with this most recent drop. ObjectDataSource is also fully supported.

Hope this helps,

Scott

# re: VS 2005 Web Application Project Release Candidate Now Available

Thursday, April 06, 2006 6:22 PM by scottgu
Hi Darrell,

Are you creating the new project by choose File->New Project (and not doing File->New WebSite)? My guess is that you are creating a web-site project and not a web application project.

Thanks,

Scott

# re: VS 2005 Web Application Project Release Candidate Now Available

Thursday, April 06, 2006 6:23 PM by scottgu
Hi Roger,

A .settings file is created for WAP projects, but the actual connection string is persisted in the web.config file. That way you can just change this (for example: using the ASP.NET admin tool) at runtime if you want.

Hope this helps,

Scott