VS.NET 2005 "Clean Solution" does not work for web project

N

Nick Gilbert

Hi,

In my VS.NET 2005, if I choose Build > Clean Solution, the BIN folder is
not touched. Shouldn't it delete all the dll and pdb files in that
folder first? Instead, I'm finding I have to do it manually.

Also, when I change from Debug to Release, all the pdb files remain in
the bin folder. Shouldn't these be deleted automatically?

Please let me know what the "Clean Solution" is supposed to do (if it's
not cleaning the bin folder) or how to fix this problem.

Thanks!

Nick...
 
S

Steven Cheng[MSFT]

Hello Nick,

As for the "Clean Solution", it will clean/remove all the originally
compiled/built intermediate or full output files(exe or dll).

http://msdn2.microsoft.com/ru-ru/library/5tdasz7h(VS.80).aspx

For example, if you have a solution that contains two project, one winform
and another class library project, winform reference the class library's
output assembly. Thus, no matter you build the class library project first,
or winform project first(or both) and choose "Clean Solution", it will
remove the output files of both the winform and class library projects(exe
and dll). and next time you "Build Solution", it will build the two
projects together.

For your scenario, your solution contains an ASP.NET 2.0/vs 2005
application. This is a paricular case because ASP.NET 2.0 project is quite
different from ASP.NET 1.1/VS 2003 project, it use dynamic compilation, so
in the new website project, it will not produce any output files in VS 2005
IDE(when you build or rebuild the ASP.NET 2.0 website project). And the bin
directory only use to hold some private referenced assemblies and does not
contains any output content. That's why "Clean Solution" does not modify
the "bin" dir in ASP.NET 2.0 website project. Therefore, you haven't missed
anything and this is the expected behavior.

In addition, here are some web articles describe the new ASP.NET 2.0
project model:

#VS 2005 Web Project System: What is it and why did we do it?
http://weblogs.asp.net/scottgu/archive/2005/08/21/423201.aspx

#Debug and Release Builds in ASP.NET 2.0
http://odetocode.com/Blogs/scott/archive/2005/11/15/2464.aspx

Hope this helps some.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.



Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.

==================================================



This posting is provided "AS IS" with no warranties, and confers no rights.
 
N

Nick Gilbert

Steven,

Thanks, but my 2005 solution actually contains quite a number of
projects which all result in a DLL being produced when I compile. Most
of these are as a result of the n-tier architecture of the structure so
I have projects like Security.BusinessLogic and Security.DataAccess. It
is my understanding that "clean solution" should remove all the files
that normally get replaced if you do a full recompile. Sometimes I find
that I manually need to delete all these DLLs to force it to recompile
all of the DLLs.

Nick...
 
S

Steven Cheng[MSFT]

Thanks for your followup Nick,

Yes, I understand your scenario that there are several class library
projects which produces middle tier component assemblies referenced by
front-end(asp.net) web application. And you want to make sure they get
updated after those class libraries are recompiled.

Actually, this does be the case in VS 2005. When you clean the solution(or
choose rebuild), the visual studio will first try clean any compiled or
partial compiled assemblies in the solution/projects, for those class
library projects, the output assemblies will be removed. However, for
ASP.NET 2.0 web project, since it does not have any output(assembly or
exe), so "clean solution" or "rebuild solution" will not remove any
component in ASP.NET 2.0 project. But when you have recompiled any class
library projects that is referenced by the ASP.NET 2.0 projects, the
referenced assemblies(in bin directory) will be automatically updated, you
can check its timestamp to verify this. Therefore, you do not need to
manually remove the referenced assembly in bin dir and readd if(make sure
you add the reference through project rather than directly pickup the
assembly file).


Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.
 

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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top