VS 2005 Web Application Project V1.0 Released

I am very happy to announce that the final release of the VS 2005 Web Application Project is now available.   You can download it for free here.

 

The VS 2005 Web Application Project option provides an alternate web project model option to the VS 2005 Web Site Project Model that ships built-into VS 2005.  VS 2005 Web Application Projects support the same project, build and compilation semantics as the VS 2003 web project model.  Specifically:

  • All files contained within the project are defined within a project file (as well as the assembly references and other project meta-data settings).  Files under the web’s file-system root that are not defined in the project file are not considered part of the web project.
  • All code files within the project are compiled into a single assembly that is built and persisted in the \bin directory on each compile.  Incremental publishing of compiled apps is fully supported within the IDE (see this post for details).
  • The compilation system uses a standard MSBuild based compilation process.  This can be extended and customized using MSBuild extensibility rules.  You can control the build through the property pages, name the output assembly or add pre- and post-build action rules.  It can also provide much faster compile times for large web projects.

Because the VS 2005 Web Application Project model has the same conceptual semantics as the VS 2003 Web Project Model, it also makes migrating VS 2003 web projects very, very easy – with zero/minimal code changes required.  To learn how to automatically upgrade a VS 2003 web project using this option, please review these VB and C# tutorials that walkthrough the VS 2003 to VS 2005 upgrade process step-by-step.

 

If you want to migrate an existing VS 2005 Web Site Project to be a VS 2005 Web Application Project, please also review these other VB and C# migration tutorials that walkthrough the Web Site to Web Application conversion process step-by-step.  This article here also describes some of the differences between the VS 2005 Web Site Project Model and VS 2005 Web Application Project Model.

 

Note that the VS 2005 Web Application Project option is available now as a free web download.  It will also be added built-in to VS 2005 SP1, and will be fully supported with Visual Studio releases going forward.  

 

New Features with this final VS 2005 Web Application Project Release

 

Last month I provided an end-to-end walkthrough example that detailed using the VS 2005 Web Application Project (Release Candidate) to build, develop and publish a new ASP.NET application.  You can review this walkthrough here.

 

The main feature additions with the final VS 2005 Web Application Release (above and beyond all the features in the release candidate that you can read about here) include:

  • Team Build Support with VSTS: You can now perform automated and command-line builds with VS 2005 Web Application Projects and VSTS
  • Resource support with the App_GlobalResources directory: Strongly typed resource classes are now automatically generated for resource files defined with the ASP.NET app_globalresources directory (allowing you to program against these directly).  You can also alternatively define .resx files within the code-behind assembly of the project itself.
  • Custom Build Tool Action Support: You can now configure and define custom build tool action support for file-types within a project.  This was missing in the previous release candidate and prevented some third-party utilities from working.
  • Edit and Continue Support: You can now make code updates that apply immediately to applications while the debugger is attached and running (see walkthrough below for details).  This is supported with both VB and C# projects. 

Available as a separate download is a custom build tool for generating a strongly-typed Profile class for the ASP.NET 2.0 Profile system.  This allows you to right-click on a web.config file containing profile declarations and auto-generate the Profile type into your code-behind project assembly.  You can learn more about this and download it here. 

 

Walkthrough of Edit and Continue Support with VS 2005 Web Application Projects

 

One feature we added into this final release of the VS 2005 Web Application Project option is “edit and continue” support for both VB and C# web applications.  “Edit and Continue” allows developers to modify code while running and debugging an application – without having to stop, recompile and re-launch it.  This is true for both code contained within the web project itself as well as for class library projects that the web project references.  This enables a much more dynamic coding experience.

 

The below walkthrough demonstrates how you can easily enable and use “edit and continue” with web application projects. 

 

Step 1: Create a New ASP.NET Web Application Project

 

Select File->New Project in Visual Studio and choose the “ASP.NET Web Application” template to create a new web project.

 

Step 2: Add a Button to an ASP.NET Page

Create a new .aspx page within the project.  Add a button to the .aspx page, and then double click to create an event handler like so in the code-behind file:

 

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 WebApplication3

{

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

    {

        protected void Button1_Click(object sender, EventArgs e)

        {

            Button1.Text = "I was pushed!";

        }

    }

}

 

Step 3: Enable Edit and Continue for the Web Application Project

 

By default edit and continue is not enabled for newly created web application projects.  To enable it for a web application project, right-click on the web project in the solution explorer and choose the “Properties” menu item.  Select the “web” tab and check the “edit and continue” checkbox:

 

    

 

Note that this checkbox can only be enabled when running the application using the built-in VS 2005 Web Server (this is because VS needs to launch the process – and IIS is a service app that doesn’t currently support this).

 

Step 4: Launch the App Using F5

 

Run the application in VS by pressing F5 (Run with Debugging) or by hitting the “Run” button.  This will launch the VS 2005 built-in web-server and bring up a browser with a page with the button on it.  Push the button to see the message we programmed above.

 

 

Step 5: Set and hit a Breakpoint

 

Switch back to VS -- without stopping debugging or shutting down the browser – and set a breakpoint on the line of code we wrote above (press F9 to-do this).  Then within the browser push the button again to break in the debugger at that location:

 

 

While stopped within the debugger, I can now add or modify any code within this event handler I want.  For example, I could add the following conditional logic to the event handler and modify the Button1.Text statement like so:

 

 

And then hit “F5” to continue running the app and immediately see the changes:

 

 

There is no need to stop or recompile the application for these types of changes (you’ll notice I was also using FireFox to run the app just for additional fun <g>).

 

Note that you can also use Edit and Continue support within Class Library projects consumed by a Web Application Project (as well as obviously standalone classes within the project).  For example: you could modify the method of a class within a class library project that is being called by an ASP.NET page.

 

The one constraint of using edit and continue within web projects is that you can’t perform any operations that will cause a restart of the application’s app-domain (for example: modifying the web.config file).  Doing so will require you to re-launch the debugger session to see code changes applied.  Note that code changes in a class library project or within the web project don’t cause the app-domain to be restarted while running under the debugger – so these types of code changes are just fine.

 

Summary

 

A page containing known issues for this release of the VS 2005 Web Application Projects can be found here (for example: two features that won’t be added until the SP1 release are support for the new Report Designer Controls and Mobile Web Form Pages).  We will also be publishing several additional whitepapers over the next few weeks that go into more details about how to use the VS 2005 Web Application Project option and answer common questions. 

 

This final release of the VS 2005 Web Application Project does require you to install a publicly available patch for VS 2005 before you install the VS 2005 Web Project template support.  Unfortunately only the VS English version of the patch is currently available – we are actively working on the non-English SKU editions of VS now (note: you can use the English version of VS on a non-English version of Windows -- that is supported by the patch now).  There is a workaround that we discuss in the known-issues/readme link above that you can use if you want to install it immediately (basically you install an English version of VS on your machine to install the patch, and then switch the language back).  We will be publishing a blog post about this in the next week or two that provides more details on how to-do this, and then obviously the non-English patches of VS when they are ready in a few weeks time.

 

As I mentioned earlier, you can also walkthrough other tutorials on the VS 2005 Web Application Project on my web-site here.  There is also a dedicated VS 2005 Web Application Project forum that you can use here to post questions or get help (the team actively monitors these forums and is eager to help).

 

Hope this helps – and thanks for your patience over the last few months,

 

Scott

 

P.S. If you have a release candidate or beta build of the VS 2005 Web Application Project already installed, you can simple shut-down VS and then uninstall that old version, and then install the final release. 

Published Monday, May 08, 2006 11:18 PM by ScottGu
Filed under: , ,

Comments

# re: VS 2005 Web Application Project V1.0 Released

Tuesday, May 09, 2006 2:49 AM by Thank you
Thank you

# re: VS 2005 Web Application Project V1.0 Released

Tuesday, May 09, 2006 2:57 AM by Mark Tait
Hi - just wondering, is this the way people are going to go with VS2005 ? Will it make any difference to the samples and code apps that you continually provide for the rest of the community. In other words, should we all now adopt the web application model, as opposed to the out of the box Web site Project model?

Thanks, Mark

# re: VS 2005 Web Application Project V1.0 Released

Tuesday, May 09, 2006 3:02 AM by scottgu
Hi Mark,

We'll be fully supporting both models going forward. Some people love the web-site model and don't understand why we are doing this new option. Some people love the web application model and don't understand why we provided the web-site option in the first place. Both groups of folks send me lots of mail lobbying for one or the other (just like I get lots of mail telling me to-do more samples in VB or C#). <g>

The bottom line is that you should use whichever option you feel most comfortable with and which works best for you.

The good news is that the code + samples we provide work pretty much the same in both models (the code-behind model and code is identical). So there shouldn't be any issue with you using one model and seeing code in the other (or vice versa).

Hope this helps,

Scott

P.S. Most of the code samples I'll personally post will still use the web-site model -- since that is what is supported with Visual Web Developer Express edition. However, I am also planning to-do a few specific posts that show off cool new features of the Web Application Project option.

# re: VS 2005 Web Application Project V1.0 Released

Tuesday, May 09, 2006 3:34 AM by Vladan Strigo [MVP]
Scott, for us which still have to work with .NET 1.1, did you maybe try internally MSBee and the new project model... ideally this would allow us to work in a known way in the new Visual Studio?

kind regards,
Vladan Strigo

# Problem with german version of VS 2005

Tuesday, May 09, 2006 3:38 AM by Christian Heindel
When I try to install the required Update to support Web Application Projects (http://go.microsoft.com/fwlink/?LinkId=63636) installation is denied due to version conflicts.

There is also no "change language" dropdown as the text states. So I cannot go and try a german version of the patch.

Any ideas?

- Christian

# re: VS 2005 Web Application Project V1.0 Released

Tuesday, May 09, 2006 3:38 AM by scottgu
Hi Vladan,

I haven't tried MSBee out yet with the web application project option -- although in theory it should work just fine.

The one thing you'll want to avoid is to split the code-behind files into partial classes (note: this is an option you can skip when upgrading a project). The reason to avoid this is because the V1.1 compiler doesn't understand partial classes (and so would give you a syntax error). But otherwise I think it would work fine.

Hope this helps,

Scott

# re: VS 2005 Web Application Project V1.0 Released

Tuesday, May 09, 2006 3:42 AM by Michael Schwarz
Hi Scott,

I do not get VS80-KB915364-X86-ENU.exe installed on one machine. Is there a German version available? Or where is the problem?

Regards,
Michael

# re: VS 2005 Web Application Project V1.0 Released

Tuesday, May 09, 2006 3:47 AM by scottgu
Hi Christian and Michael,

As I mentioned above, only the English patch of VS is currently available for download. We will be putting out a German (and Japanese, Chinese, Spanish, Italian, French, and Portugese) patch for VS in the next few weeks.

In the meantime, you can follow the steps in the "Known Issues" link above as a workaround. It requires you to install a VS English SKU (note: the free Trial edition should work fine or you can download via MSDN), and to temporarily switch the VS default language. But once you install the patch you can then switch back to German.

Hope this helps -- and please note we will definitely have localized patches out soon (so the above workaround is just temporary until then).

Scott

# re: VS 2005 Web Application Project V1.0 Released

Tuesday, May 09, 2006 4:05 AM by jv
The first bullet point states that the project-file is back. Does this mean that we have to once again suffer the same lockups as before? So if one developer has checked out the project file from VSS others may not add files to the project etc?

No, we will not allow multiple checkouts.

# re: VS 2005 Web Application Project V1.0 Released

Tuesday, May 09, 2006 4:34 AM by Stephen Whitaker
Scott this is just fantastic, it finally enables us to develop in a way we have grown used to - the include/exclude folders functionality was the biggest hurdle we had when trying to code in a team.

Many thanks for everyone's hard work with this, and for listening to your customers :)

Steve

# re: VS 2005 Web Application Project V1.0 Released

Tuesday, May 09, 2006 4:55 AM by Christian Heindel
Hi Scott,

thank you for your answer. I think I can wait... :-)

Only the text speaking of a language dropdown iritated me. I even switch from from Firefox to IE in order to find the dropdown... ;-)

- Christian

# re: VS 2005 Web Application Project V1.0 Released

Tuesday, May 09, 2006 6:39 AM by Adrian O'Connor
Hello Scott,

The web-application project is great -- it really is much a better way of handling large web projects than the default VS2005 method, and I'm really glad that you're going to make it widely available as part of SP1 -- it is definately the right thing to do.

There is, however, one small 'annoyance' that I was hoping would be resolved with 1.0 -- F7 doesn't switch from aspx source to code-behind (nor does Shift-F7 switch back). This quite often means having to hunt through the solution explorer to find the file's corresponding code behind and this can be tedious - especially in large projects. I'm really surprised that it wasn't spotted and fixed after RC1 went out. Maybe I should have posted back then.

Anyway, I have an interim fix -- I have written a macro and assigned it to the easily reachable key combination Alt + `. I can now switch to the code-behind and back without leaving the home keys.

Here is the Macro for anybody else that finds this 'feature' as annoying as I do -- I hope the code doesn't get mangled too badly by the formatting:

---

Public Module WebCodeSwitcher

Sub Switch()

If (DTE.ActiveWindow.Type = EnvDTE.vsWindowType.vsWindowTypeDocument) Then

Dim ActiveFile As String = DTE.ActiveDocument.FullName
Dim FileToOpen As String = ""

If (ActiveFile.EndsWith(".aspx.cs") Or ActiveFile.EndsWith(".ascx.cs")) Then

FileToOpen = ActiveFile.Substring(0, ActiveFile.Length - 3)

ElseIf (ActiveFile.EndsWith(".aspx") Or ActiveFile.EndsWith(".ascx")) Then

FileToOpen = ActiveFile + ".cs"

End If

If (FileToOpen <> "") Then

DTE.ItemOperations.OpenFile(FileToOpen)

End If

End If

End Sub

End Module

---

P.S. Having to write the macro in VB brought back some long-forgotten memories of VB6 *shudder*. Thank goodness we have C# with its nice clean style :)

# re: VS 2005 Web Application Project V1.0 Released

Tuesday, May 09, 2006 6:44 AM by 拉力试验机
It's so cool!
Is there a Chinese version available?

# re: VS 2005 Web Application Project V1.0 Released

Tuesday, May 09, 2006 7:36 AM by Granville Barnett
Very useful, I like the edit and continue functionality.

Granville.

# re: VS 2005 Web Application Project V1.0 Released

Tuesday, May 09, 2006 8:08 AM by Sergio Pereira
Thanks for answering our whinings :) Migration, I dread you no more!

# Re: VS 2005 Web Application Project V1.0 Released

Tuesday, May 09, 2006 8:48 AM by Simone Chiaretta
Scott, are there anywhere on your blog or somewhere else an explanation on which model is better for which scenario?
Thx
Cheers
Simone

# XML Documentation

Tuesday, May 09, 2006 9:18 AM by Daniel
One reason I prefer this model is because I like to generate xml code comment documentation for nDoc- even for UI code. Does this model support generating /doc .xml alongside the project assembly?

# re: VS 2005 Web Application Project V1.0 Released

Tuesday, May 09, 2006 9:28 AM by www.paketim.com
Why edit and continue is not enabled by default? Is it because of performance reasons during complilation?

# re: VS 2005 Web Application Project V1.0 Released

Tuesday, May 09, 2006 10:11 AM by scottgu
*Regarding F7 Problems*

Hi Adrian,

The F7 issue was one that took us awhile to figure out (you can see a long thread of investigations here: http://forums.asp.net/2/1256828/ShowThread.aspx)

Basiclally, it doesn't work by default for some VS profile settings -- we will fix this for SP1 (since it requires a VS change).

The good news is that you can enable this now by following the below steps to map F7 for the ToggleDesigner command (without having to run any Macros):

The fix for now is to either change your profile or map F7(or another key) to the ToggleDesigner command. Here is how you would do this:

1) Bring up customization dialog with "Tools\Customize..."
2) Bring up the keystroke mapper with "Keyboard..."
3) Set focus in "Press Shortcut Keys" text box
4) Press F7 or some other keystroke you want
The "Shortcut currently used by" box will show the command currently invoked by the keystroke.
5) Set focus to "Show Commands Containing" and type ToggleDesigner. This will select the View.ToggleDesigner command in the list box of commands
6) Next press the "Assign" button to assign the keystroke shortcut to the command.
7) Click "OK" to the keystroke mapper dialog
8) Click "Close" to the customization dialog

Hope this helps,

Scott

# re: VS 2005 Web Application Project V1.0 Released

Tuesday, May 09, 2006 10:12 AM by scottgu
Hi Simone,

This article walksthrough some of the pros/cons of each option: http://msdn.microsoft.com/vstudio/default.aspx?pull=/library/en-us/dnvs05/html/WAP.asp

Hope this helps,

Scott

# re: VS 2005 Web Application Project V1.0 Released

Tuesday, May 09, 2006 10:13 AM by scottgu
Hi Daniel,

The Web Application Project model supports generating XML code comments (the same as any class library project). So if you are looking for this support you are best off with this Web Application Project.

Hope this helps,

Scott

# re: VS 2005 Web Application Project V1.0 Released

Tuesday, May 09, 2006 10:14 AM by scottgu
To answer the question above about a Chinese edition -- yes, we will definitely have a Chinese version.

Thanks,

Scott

# re: VS 2005 Web Application Project V1.0 Released

Tuesday, May 09, 2006 10:16 AM by scottgu
Hi Paketim,

The reason Edit and Continue isn't on by default is that it does require the web-server process to be created and shutdown on each debug session. Some people might prefer to instead just keep it always running.

Note that once you configure it at the project file level, it will persist until you change it. So this is a setting you only need to make once per app -- and then all runs from that point on will have it enabled.

Hope this helps,

Scott

# re: VS 2005 Web Application Project V1.0 Released

Tuesday, May 09, 2006 10:20 AM by ElQuintero.net
Thanks Scott Very good

# re: VS 2005 Web Application Project V1.0 Released

Tuesday, May 09, 2006 10:51 AM by Lee
Hi Scott,

Congratulations on the release of the WAP template! :)

How well does the Web Application Project work with VS2005 test driven development?

I heard from a colleague that it is not possible to use the test driven development model with anything other than the Web Site project because of the reliance on the App_Code directory?

Thanks,

Lee

# re: VS 2005 Web Application Project V1.0 Released

Tuesday, May 09, 2006 11:13 AM by scottgu
Hi Lee,

The VS 2005 Web Application Project aggregates the Class Library Project system -- so you can use any unit test or TDD tools that work with that. This means you should be able to unit test your classes and pages just fine.

Hope this helps,

Scott

# re: VS 2005 Web Application Project V1.0 Released

Tuesday, May 09, 2006 12:01 PM by Tom25
Scott,

I went through your tutorials. They are very well done. I wish the MS documentation had screen shots and was as easy to follow as your tutorial.

One comment: The part where you add the Master page to the other pages and delete the static html previously on the page is a challenge for those who are new to asp.net.

As a rule, should the Master page be created first and then added to new pages to eliminate a lot of manual asp coding in the Source view?

Thanks
Tom

# re: VS 2005 Web Application Project V1.0 Released

Tuesday, May 09, 2006 12:08 PM by scottgu
Hi Tom,

In general I recommend creating the Master Page first and then basing pages on it. With Web Application Projects you can choose the "Content Page" option when doing an Add New Item. This will then allow you to build a new .aspx page that is based on the master (it will prompt you for the master to base it on).

Hope this helps,

Scott

# re: VS 2005 Web Application Project V1.0 Released

Tuesday, May 09, 2006 2:17 PM by Dave Bacher
The thing about the "compile everything in the folder" approach that bothers me is that if anyone manages to get a file into one of the virtual directories, they can cause arbitrary code to be compiled into the application and run without detection.

With the "compile only these files" approach, they must modify an existing file. With ASP.NET 2.0, it is possible to sign the assemblies produced, and it is possible to check the signature of the assembly in various places (including from a data layer not included in the base application). This, in turn, cuts off any modification or file-insertion attack.

So far as above, talking about the Visual Source Safe issue...

When you list explicitly which files are included, via any mechanism, inherently you must check out that file to make a change if you are using an advisory-lock based source code system.

So you make a policy. You check out the project file, you commit a placeholder file that consists of a single comment ('/* This is a placeholder for Project I0001 (R0001/D0001) - contact project lead for more information */').

The template means the developer just needs to check out the project, add the template, then check it back in. The empty file won't impact anything, and can be immediately checked out.

Alternatively, you can split your project into several smaller web projects. There is no restriction that there be a 1 to 1 relationship between applications and web projects. All assemblies are loaded automatically as long as they are in the same folder, and as long as the assembly containing the code behind class is present on the system, the system will allow access to the page successfully.

If you set up smaller web projects representing projects or scopes of work, and work on those smaller projects, you can reduce or eliminate contention in VSS.

For example, it is unlikely that more than one or two people would be working on the "authentication pages" project, and so if you have a web project representing just that portion of your web application, it is extremely unlikely that you would ever see a conflict.

# re: VS 2005 Web Application Project V1.0 Released

Tuesday, May 09, 2006 4:12 PM by srinivas
hi scott,
tested the Regarding F7 Problems issue solution provided by you for adrian ,it really works and definitely a cool feature !
Thanks

P.S. still to download and test V1.0 of web application project,hence no idea how its gonna perform ! :)

# re: VS 2005 Web Application Project V1.0 Released

Tuesday, May 09, 2006 4:16 PM by Nick Berardi
The problem I am having now is including controls like the web site use to.

In the web.conf under system.web/pages/controls, you could add references to all the pages and they would show up in the intillisense, however they do not anymore and I am sort of disappointed because I loved that feature.

But over all this is great, and if you have a solution for the above question I would love to hear the answer because I that is my only gripe from this great add-on.

# re: VS 2005 Web Application Project V1.0 Released

Tuesday, May 09, 2006 4:29 PM by scottgu
Hi Nick,

We actually do support intellisense for controls registered within the web.config file with Web Application Projects.

Can you try adding the control references in your web.config file, and then opening up a page in design-view, and then switch back and try intellisense on the new controls?

I've noticed that sometimes it requires the controls to be activated at least once for VS to generate the intellisense schemas. It should then work fine.

Hope this helps,

Scott

# Re: VS 2005 Web Application Project V1.0 Released

Tuesday, May 09, 2006 5:17 PM by Simone Chiaretta
Scott,
thank you very much for the doc link

# re: VS 2005 Web Application Project V1.0 Released

Tuesday, May 09, 2006 5:17 PM by Tobias Hertkorn
Hi Scott,

thank you so much. Is it just me, or does everybody distrust the "standard" designer in VS 2005. Maybe that's because I grew up on vim. ;)

Cheers,
Tobi

# re: VS 2005 Web Application Project V1.0 Released

Tuesday, May 09, 2006 8:18 PM by SelfishGene
In case anyone else runs into this proble...

When converting my web site I got the following error on some user controls which were using other user controls:

Generation of designer file failed: The 'myprefix:MyUserControl' tag has already been registered.

The reason this happened is because MyUserControl was registered in web.config already.

I found with the Web Site model if two user controls were registered in web.config, and I wanted to put one inside the other, I still had to register it at the top of the ascx file.

Removing this registration fixed the problem.

Thanks.

# re: VS 2005 Web Application Project V1.0 Released

Tuesday, May 09, 2006 8:33 PM by Danijel
Edit and Continue feature is great but if I correctly understood it works only in web application projects.
Is there any chance that Edit and Continue feature will be available for those who use web site projects?
Thanks.

# re: VS 2005 Web Application Project V1.0 Released

Tuesday, May 09, 2006 10:08 PM by SelfishGene
Ok another big problem for us. Most of our commonly used user controls are registered in web.config. When the .designer.cs is created by converter, they are typed as System.Web.UI.UserControl instead of the correct type.

Is there any way to fix this? This prevents pretty much all of our pages from compiling!

Thanks.

# re: VS 2005 Web Application Project V1.0 Released

Tuesday, May 09, 2006 10:13 PM by scottgu
Hi SelfishGene,

Can you post the usercontrol issue here: http://forums.asp.net/1019/ShowForum.aspx

Note that we do fully supported creating the right typed user control in your .designer.cs file. If you can post the issue in the WAP forum with more details about your project, we can figure out what it isn't working for your project.

Thanks,

Scott

# re: VS 2005 Web Application Project V1.0 Released

Wednesday, May 10, 2006 5:41 AM by JasonBSteele
Scott,

This is great, my compile times have been cut from 5 minutes back down to 2 again!

Its a shame that "Edit and Continue" is not available under IIS. Are there plans to remedy this in the future?

I can also confirm that I had a problem with user controls. It was easily fixed by adding the user control project to the web apps references.

# re: VS 2005 Web Application Project V1.0 Released

Wednesday, May 10, 2006 10:15 AM by Nick Berardi
Scott,

Thanks for the reply. It actually did work the way you said, but there were some issues that arose with the first build of the project. Since I had a couple C# controls in a folder that was referenced in the web.config, it wouldn't generate the designer class for that web page because it couldn't yet find the control.

So what I did was remove reference to the control in my page and then generate the page, then I had to re-insert the reference by hand, and after I got the project to compile intillisense started working again.

Either way good job. Thanks for hte great work,
Nick

# re: VS 2005 Web Application Project V1.0 Released

Wednesday, May 10, 2006 5:34 PM by phani
Scott,

I have a 2.0 website. I added a Web deployment Project to it. I also created a setup project to generate a msi file for installing the website. On my IIS I have both asp .net 1.1 and 2.0. But the virtual directory created by msi is using asp .net 1.1. After the install I had to manually change it to 2.0 for the site to work. How do I force the virtual directory created to use 1.1 through setup.

thanks
phani

# re: VS 2005 Web Application Project V1.0 Released

Wednesday, May 10, 2006 6:17 PM by Darren
Scott,

Thanks for all the work you've done on this. Personally, I like both models for different situations. To me they can be equally usefull so I'm glad to hear they will both always be supported.

The only real gripe I have about VS.NET 2005 is the HELP, specifically the time that it takes to load. I have a 3ghz machine with 2 gigs of memory and I have to wait several minutes for it to load, and much of the time it comes up with nothing found or the wrong words. This is just from hitting F1 over a class name. I've completely turned off web searching so this is happening on the help installed with VS.NET. I'm not sure why the help had to change other than more documentation. If I need something off the web I can get it using a browser myself. As it is now, I don't even use help in VS.NET because of this lag. Is there something can be done about this?

# re: VS 2005 Web Application Project V1.0 Released

Thursday, May 11, 2006 9:20 AM by Kabelsalat
Scott,

In one of your previous posts you wrote, that a trial version of an english Visual Studio would be sufficent to install the WAP-Patch for my German VS Prof. This is great, as I do not have access to any english Version, but it seems like I'd also need a MSDN-Abo for downloading the trial. Is there any public location where I can download the trial? A english Team Foundation Server Trial can be dowloaded here: http://www.microsoft.com/downloads/details.aspx?familyid=D5C12289-F4E4-49A9-9235-AB2F6D4CA097&displaylang=en Can this be used for installing the patch?

Thanks,

Kabelsalat

# re: VS 2005 Web Application Project V1.0 Released

Thursday, May 11, 2006 9:48 AM by Shawn B.
The reason I chose to use the WAP Add-In is because we have an application with thousands of pages in production for the past few years that were next to impossible to migrate to the new Web Site option. Re-introducting the Web Application (something that should not have been removed in the first place) is the only reason we were able to migrate to 2005 in the first place.


Thanks,
Shawn

# re: VS 2005 Web Application Project V1.0 Released

Thursday, May 11, 2006 10:41 AM by srinivas
hi scott,
just saw that edit and continue feature is enabled only when we use asp.net development server aka cassini,any hcances of this feature being available also for IIS .

Thanx
Srinivas

# re: VS 2005 Web Application Project V1.0 Released

Thursday, May 11, 2006 3:53 PM by JMKurtz
Nice screenshots. So, do you guys use Mozilla at Microsoft?

# re: VS 2005 Web Application Project V1.0 Released

Friday, May 12, 2006 1:00 AM by scottgu
Hi Kabelsalat,

I believe the trial edition should work. I just asked someone on my team to try and come up with the end-to-end steps -- once we have these I will publish them on my blog.

Thanks,

Scott

# re: VS 2005 Web Application Project V1.0 Released

Friday, May 12, 2006 1:01 AM by scottgu
Hi Srinivas,

Unfortunately Edit and Continue requires that the debugger launch the process -- which is why it works for the built-in web-server but not for IIS.

Sorry!

# re: VS 2005 Web Application Project V1.0 Released

Friday, May 12, 2006 1:04 AM by scottgu
Hi JMKurtz,

No -- I usually use IE, but I like to show things in FireFox on my blog since a lot of people assume Microsoft developer technology isn't cross-plat or work with other browsers. I like to prove them otherwise. :-)

Thanks,

Scott

# re: VS 2005 Web Application Project V1.0 Released

Friday, May 12, 2006 1:05 AM by Kabelsalat
Scott, thanks for your efforts.

Kabelsalat

# re: VS 2005 Web Application Project V1.0 Released

Friday, May 12, 2006 1:05 AM by scottgu
Hi Phani,

To force the creation of the web-site to be V2.0, you will want to run a custom action as part of your .MSI setup to mark the application as using V2.0. You can do this by causing the aspnet_regiis.exe utility to run (this is installed under your windows directory).

Hope this helps,

Scott

# re: VS 2005 Web Application Project V1.0 Released

Friday, May 12, 2006 1:25 AM by scottgu
Hi Danijel,

Unfortunately Edit and Continue as defined above only works in Web Application Projects. What you can do, though, is edit code live in web-site projects as you are developing (just not when a breakpoint is hit).

Hope this helps,

Scott

# re: VS 2005 Web Application Project V1.0 Released

Friday, May 12, 2006 5:44 PM by phani
Thanks Scott That worked.
I first thought of launching a batch program and find out that vs studio setup does not support launching batch program. I then thought of having a VB script but again read that antivirus programs usually prevent launching of scripts during install.

Is there a way to programatically change the asp.net version for the virtual directory using Installer class.

If I launch aspnet_regiis using Process.start will the antivirus program treat it as executing a script and block it?

thanks
phani

# re: VS 2005 Web Application Project V1.0 Released

Saturday, May 13, 2006 11:07 AM by Deepak
Hi Scott,

This is great for people who are so used to the VS 2003 model. I'm a big fan myself. However the Website model of VS 2005 is equally impressive especially with WDP. I spent countless hours trying to figure out Team Build with Websites and finally it dawned to me that WDP is the trick. This is important and needs better documentation in MSDN Library in the Team Build section. The documentation is pretty skimpy and I guess it would be great for us folks who use TFS that the process for building WAP or WDP based Web Apps be clearly documented.

Thanks

# re: VS 2005 Web Application Project V1.0 Released

Saturday, May 13, 2006 12:22 PM by scottgu
Hi Phani,

If you want to send me email (scottgu@microsoft.com) I can try and connect you with someone who might know a programmatic way to change the registrations for your install program.

Thanks,

Scott

# re: VS 2005 Web Application Project V1.0 Released

Monday, May 15, 2006 12:23 PM by Perry Stathopoulos
Hi Scott,

Good work on communicating this to the community!

Just wanted to point a possible issue with the Web Application Project. It appears that if you embed a resource (like an image) into the web application project it is not accessible through the GetWebResourceUrl() method. The method will generate the expected WebResource.axd src, but the handler does not seem to get the resource.

Entering the src value in the browsers address bar returns a 404.

I have no problems when doing the same thing in a Class Library and including that class library in the web app project.

Can you confirm if this is indeed a problem?

Regards,
Perry

# re: Follow-up to F7 command advice

Monday, May 15, 2006 1:31 PM by Adrian
Hi again Scott (and srinivas),

Mapping the Tools.ToggleDesigner command to F7 is a Good Thing, and it restores the beahaviour that most web developers will want. I'd have been very happy to have had it silently 'restored' as part of the SP1 upgrade.

This command, however, has a severe short-coming - it doesn't honour my preference in Tools -> Options for opening ASPX files in source view, not design mode.

E.g. I am looking at a code-behind class file and I don't have the aspx page source open in the background. When I hit F7 it brings up the Designer, which is definitely NOT the desired behaviour. If the aspx.cs file is already open in another document window, the behaviour /is/ correct and the source is shown.

There is a fix for this bug -- the uber-macro I posted earlier does everything that View.ToggleDesigner does -- AND it honours the user's preference! Plus you can map it to F7 in exactly the same way that you desribe in your post. I'm very happy with Alt + ` though; much easier to reach and I use it all the time.

If only I could stop that stupid 'you're running a macro!' baloon tip from appearing every time...

Anyway, thanks again for the answer -- I notice that searching for "F7 web application project" on Google brings up your comment as the top result, so hopefully everyone else who chose "C#" as their default VS2005 setting can happily switch between files once more.

Adrian

# re: VS 2005 Web Application Project V1.0 Released

Monday, May 15, 2006 2:06 PM by Dave
Scott,

I just converted an ASP.NET 2.0 website to a web application project. How do I get my virtual path provider to initialize now? Before, I just put the classes in the App_Code folder and it magically worked. Now where do I put them?

Thanks,
Dave

# re: VS 2005 Web Application Project V1.0 Released

Monday, May 15, 2006 10:21 PM by Ben Strackany
Ah finally! Now I can get back to xcopy deployment.

# re: VS 2005 Web Application Project V1.0 Released

Monday, May 15, 2006 10:37 PM by lancers
Hi Scott,
Do you have any plan to make a patch for Korean language?

Yes, I saw your comment above.. but Korean patch was not listed there.

your comment:
As I mentioned above, only the English patch of VS is currently available for download. We will be putting out a German (and Japanese, Chinese, Spanish, Italian, French, and Portugese) patch for VS in the next few weeks.

# re: VS 2005 Web Application Project V1.0 Released

Tuesday, May 16, 2006 2:42 AM by scottgu
Hi Lancers,

Yep - we will have a Korean patch out as well. Sorry I missed listing it there.

Thanks,

Scott

# re: VS 2005 Web Application Project V1.0 Released

Tuesday, May 16, 2006 2:43 AM by scottgu
Hi Dave,

I believe you should be able to put it in your project and still have it load and work as-is. Please send me email if that isn't the case.

Thanks,

Scott

# re: VS 2005 Web Application Project V1.0 Released

Tuesday, May 16, 2006 2:43 AM by scottgu
Hi Perry,

Can you send me an email describing the scenario and providing a simple repro sample? I can then follow up with folks and figure it out.

Thanks,

Scott

# re: VS 2005 Web Application Project V1.0 Released

Wednesday, May 17, 2006 5:53 PM by SK Dutta
Hi Scott, Just wanted to let you know that the response from your team during the controlled beta stage was superb!

# re: VS 2005 Web Application Project V1.0 Released

Thursday, May 18, 2006 2:02 AM by Brad
I seem to be having problems w/ a page named Login.aspx in autogenerated code:

((Login)(this)).AppRelativeVirtualPath = "~/Login.aspx";

and the compiler thinks "Login" is System.Web.UI.WebControls.Login not MyStuff.Login

# re: VS 2005 Web Application Project V1.0 Released

Thursday, May 18, 2006 4:02 AM by scottgu
Hi Brad,

Yep -- you are getting a name conflict because the class name you are specifying is not fully qualified, and there are two "Login" type names that the compiler can choose from.

Try changing it to this to fix it:

((MyStuff.Login)(this)).AppRelativeVirtualPath = "~/Login.aspx";

Hope this helps,

Scott

# re: VS 2005 Web Application Project V1.0 Released

Friday, May 19, 2006 4:49 PM by rvanguilder
Hi Scott,

I switched over a project from IIS to Cassini to get Edit and Continue. Cassini trips up a few of my HttpModules because it handles requests for static content, whereas aspnet generally doesn't see these requests.

Is there an easy way to pragmatically detect if I am running under Cassini? Something like:

if (IsCassini)
if (IsStaticRequest(request.RawUrl))
return;

I believe that IIS7 gives aspnet more control over static content. Should I be beefing up my modules to account for static requests in anticipation for IIS7?

rvanguilder

# re: VS 2005 Web Application Project V1.0 Released

Sunday, May 21, 2006 9:50 AM by KenA
It´s sad that with WAPs we lost the option in Solution Explorer to show 'Nested Related Files'.

Additional missing things here: