Exclude from Project not available for VS2005 web projects

B

Brad

I'm not one to rant or flame....so please excuse me while I do so for this
once. I've now spent a bit of time working with VS2005 beta 2 to see how it
functions for web development, especially how our current extensive number
of .Net 1.1 web apps convert to it. After a week's time I dont's mind the
converted app code that was broken and had to be changed, due to
deprecation, new framework classes (some of which have names identical to
ones we created...first) or other...those are all one time tweaks and take
but a few minutes (or hours) of work.

What I was very disappointed to discover is that the seemingly trivial
feature to "Exclude/Include from project" is no longer available for web
apps in VS2005. From what I've read so far, this is by design and it's not
coming back. I realize that more than one web developer/business presented
a compelling reason to Microsoft to remove this feature...but for some of us
I think the removal of this trivial little feature is going to be a big step
back in project administration and productivity.

This is going to make project administration for a web app of any depth a
real pain. Now, whether a file/folder is actually part of a project it's
there in the "project". That's because basically there is no "project" file
for web apps anymore. Now a web app/project is a folder and **all** files
and folders under that folder...period. For anyone who works with web of
any depth and breath you're going to see a lot of files and folders. If you
have something like a root web (i.e. portal), when you load your project
you're now possibly going to see your **entire** web site including all web
apps under the root...and on down if you have layered apps.
To further complicate things, when you build/compile the web app it now
seeks out all .Net related files in the heirarchy....whether they are part
or your "project" or not...including any third party vendor software, i.e.
Crystal. For example, I have a root web project/app and many web apps
under the root. Now to VS2005 it all one one big project...and when I build
to root web project it's trying to build and validate every web.config,
every aspx page and code behind for every web app as part of this project.
(perhaps few people have root web projects but there must also be some folks
out there how have layered web application...maybe).

I hope someone can point out that I'm vastly mistaken or that there is a
much better way to create and manage projects which have similar structure
so that I can crawl back into my cubicle and await for the joyous release of
..Net 2. But then there's always notepad for our development environment.

***IF*** this feature matters to anyone you can vote on it on the msdn
bug/suggestion feedback for "bug" FDBK13160
http://lab.msdn.microsoft.com/productfeedback


Okay, thanks for letting me whine. I'll crawl back under my rock.
 
B

Brock Allen

Yes, it is different. This is primarily because the compilation model in
ASP.NET 2.0 is different. The compilation step that we used to do with VS.NET
2003 is no longer necessary or pertinent because the model is to let ASP.NET
do the compilation for you at runtime and it only compiles what it should
(you can precompile but it's essentially the same as if ASP.NET were doing
it for you). So, the idea is that whatever goes into the directory is what
makes up your web application. This is different because in VS.NET 2003,
what goes into the directory is for both at compile time and at run time
which makes for a messy deployment (you need to extract the correct set of
files to deploy). Now there's no confusion. If you don't want it to be part
of your app, then don't put it there. If you want data files that aren't
compiled, there's the App_Data folder for those things. This model makes
the "Exclude File From Project" option from VS.NET 2005 moot.
 
S

Steven Cheng[MSFT]

Thanks for Brock's inputs,

Hi Brad,

Also thanks for sharing your user experience and feeling with us. As for
the missing "Exclude from / Include in project" in VS2005 , and different
behavior when open web project in VS.NET from IIS, here are some of my
understanding:

1. In VS.NET 2003 when we developing ASP.NET web project, we'll have a
csproj /vbproj file associated with each project. This file contains all
the files(as well as the files' info ) contained in the project. And since
asp.net 1.x project developed with VS.NET2003 rely on the IIS server,
there'll also exist the url path of the project in IIS within the
csproj.webinfo/ vbproj.webinfo. When we include/exclude file in project,
the project file will be updated. However, this project file will become
an unnecessary item when we deploy the project into product server. Also
when we are dealing with Team development which use source control
tools(vss/ cvs...), this additional project file(also those webinfo .... )
become rather useless and may cause many problems when checking in/checking
out sources.

So in asp.net 2.0, VS.NET 2005, we have changed the compilation mode and
the project structure. When developing asp.net 2.0 project in VS.NET2005,
we no longer need project file, we just make use of a well-known folder
structure when dealing with a web project. For example, the "app_data"
sub folder in asp.net 2.0 project's root folder just contains all the
database files. And "app_code" will contains the code files(for components
or utilities) need to be compiled at runtime.

One important thing is since we no longer have project file, all the files
in the project folder(it's a normal folder on file system) are treated as
an item in the project. If we don't want it or want to exlude it, we can
just remove it from the project's folder ( for example delete it or move
to other disk folders).


2. As you also mentioned that when we open a project in IIS which contains
sub applications in the sub folder, it will display all the sub projects.
This is also because the ASP.NET 2.0 project are all based on folder
structure, so project file to indicate which files are included in the
project. However, since we no longer need IIS when developing project, we
can just developing separate web project in separate physical disk folders.
We can put all the project files into a normal folder and then open it in
VS.NET 2005 , developing pages and run it in the buildin test server.
Only at the deploy time do we need IIS. And since the new compilation mode,
what we need is just copy all the stuffs in our project's root folder into
the IIS's virtual dir. If we use the procompiled feature, we also need to
copy the procompiled assembly and resources into the "bin" folder.

So I think these new features will make the asp.net developing more
flexible , not restricted to the environment( require IIS available).
Also, we will no longer encounter erros when opening project because of the
project files(csproj/vbproj or .webinfo file) 's content are corrupt for
any reason.

How do you think of this? If you have any other questions or ideas, please
feel free to post here.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
B

Brad

I think the change is accomodating certain environments / scenarios and
adding an incumberence to others. But I've already done my one alotted
ranted so I'm going to go and leave it at that.
 
B

Brock Allen

I think the change is accomodating certain environments / scenarios
and adding an incumberence to others. But I've already done my one
alotted ranted so I'm going to go and leave it at that.

This is always true as things change from release to release. I've done my
fair share of ranting on some of the new 2.0 features I disagree with. I
think one of the big problems is that much of the time Microsoft can't (or
won't) just come out and say "Sorry, it's different and it's for the better".
Instead many times Microsoft capitulates to large customer's demands rather
than doing what's best for the technology. The particular issue I'm thinking
of was the new, but then switched back to old codebehind model in 2.0. In
beta 1 they changed the codebehind model to not rely upon base classes. IMO,
this would have been a huge win to not require inheritance across two classes
(files, really -- the ASPX and .cs/.vb) that are tightly coupled. This isn't
to say you can't use inheritance for common base class features of all your
pages, I'm specifically talking about inheritance with the ASPX and its one
codebehind file. Anyway, they buckled and reverted to the same model as v1.1.
I was very upset (still am :)) that they wouldn't just come out and say "this
is a new and different and better way. It's a change, yes, but in the long
run it will be better".

Oh well, I guess you win some and you lose some :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top