An Avanade Blogging Community

Welcome to An Avanade Blogging Community Sign in | Join | Help
in Search

Geek.Speak()

Web Projects in VS2005

Something I’ve been meaning to blog about since August is VS2005’s support for web projects.  The new version of VS now has “Web Sites”, not “Web Applications”.  This confused alot of people intially and will continue to confuse newcomers, but the gist of it is this…. VS projects (regardless of type) are project-file based.  Meaning, VS loads the project file (.csproj, vbproj, etc.) and that file contains all the information about that project that VS needs (references, files contained, default namespace, build events, etc.).

That changed in VS2005 when “Web Sites” are introduced.  “Web Sites” are the same ASP.NET application, but they are project-file-less.  They are entirely file system based.  There are a lot of opnions out there about this, and mine is this – I personally don’t care fo the project-file-less project, but what I really loathe is I don’t have a choice.  The old project-file based Web Application available in VS.NET 2003 is not present at all in VS2005 – even if I want it… until now.  The ASP.NET team at Microsoft has listened to the outcries and have released a custom project type for VS2005 that in effect gives us the old project file based Web Application.  You can download it here.  Fred has been listening to me compain about this for months and I have finally listened to his advice and I’m checking this new project type out.  Fred, throw me your blog URL and I’ll give you a link here

Project-File-Less Web Application Thoughts

  • No namespaces by default – I like namespaces and I don’t see any value in removing them.  I view a web application as a piece of the solution (there are usually several other projects in the solution), so I like assemblies and namespaces for each.
  • No true compilation step – compilation is performed up first execution.  This means you don’t have to compile explicitly, but you do have to deploy your application code so that upon-first-hit ASP.NET can compile it for you.  Personally, I don’t like this, I’d rather compilation and the units I deploy to be be explicit
  • Life without project files makes references very painful.  If you think about it, when you create a reference in your web application (web site), without a project file, how does it know there is a reference?  Well, in project-file-less world the presense of an assembly in the Bin\ directory constitutes a reference.  This is true in the VS.NET2003 world as well, but at least in that project-file world, the next time I load up that project and it find an assembly there the IDE knows if it’s supposed to care about it or not.  This really isn’t a big problem until integrated source control enters the equation.  With integrated soruce control, any file on the file system directory is added to source control.  They made some hacks in this area – namely .refresh files – to help the IDE know when not to add certain types of references to source control.  Again, without a project file, the IDE has no way of knowing.

I’m not exactly sure what problem they were trying to solve when removing project files (though I have some theories I’ll keep to myself).  Anyway… glad to see project files back…

Published Sunday, February 12, 2006 7:49 PM by kellyb
Filed Under:

Comments

No Comments
Anonymous comments are disabled

This Blog

Post Calendar

<February 2006>
SuMoTuWeThFrSa
2930311234
567891011
12131415161718
19202122232425
2627281234
567891011

News

The posts on this weblog are provided "as is" with no warranties and confer no rights. The opinions expressed herin are the personal opinions of the individual authors and do not represent the views of Avanade in any way.

Syndication