Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / March 2006

Tip: Looking for answers? Try searching our database.

VISUAL STUDIO.NET 2005. Exlude a file from project

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Evian Spring - 02 Mar 2006 22:52 GMT
Hi,

If you right click one of the file within a project, and select from
the context menu "Exclude from project', visual studio will rename the
file to File_Name.File_Extension.exclude.

Example: image1.jpg   becomes image1.jpg.exclude

I cannot believe Microsoft is actually doing that?  Renaming the file?
The exluded file in my example is no longer a .jpg.

Am I missing something?  This must be a bug but I just can't believe it
Gabriel Magaña - 02 Mar 2006 23:02 GMT
If you are talking about asp.net projects, then you are right...  MS in its
eternal wisdon thought this was an ok thing to do (also you cannot exclude a
file from source control).  There is hope, you can use Web Application
Projects ( http://go.microsoft.com/fwlink/?LinkId=57541 ) and get most of
the asp.net project brains back...

> Hi,
>
[quoted text clipped - 8 lines]
>
> Am I missing something?  This must be a bug but I just can't believe it
Lau Lei Cheong - 03 Mar 2006 04:24 GMT
Or you might just change it back later.

Actually I think "renaming when a file is taken out of a project" is a right
thing to do because otherwise some dxxb user might ask "why I still be able
to see the file after I exclude it from the project?" They just doing it in
a wrong way by changing the extension. The should have named it
"filename_excluded.ext", so you know what file has been excluded and you can
still view the file if you want.

"Gabriel Magaña" <no-spam@no-spam.com> ¼¶¼g©ó¶l¥ó·s»D:Oca3d0kPGHA.2012@TK2MSFTNGP14.phx.gbl...
> If you are talking about asp.net projects, then you are right...  MS in
> its eternal wisdon thought this was an ok thing to do (also you cannot
[quoted text clipped - 14 lines]
>>
>> Am I missing something?  This must be a bug but I just can't believe it
Gabriel Magaña - 03 Mar 2006 21:18 GMT
> Or you might just change it back later.

As long as the file remains in the directory of the web solution, the file
will be considered as included in the project.  There is no such thing as a
web project as of vs2005 (with the exception of the Web Application Projects
extension), so there is no such thing as excluding the file and then
renaming back to the original name without including it again.
Lau Lei Cheong - 04 Mar 2006 02:51 GMT
No, there IS a difference.

For example, if you taken a file out of project, the "Copy Project" button
on the solution panel won't copy that file to the new location. Similar
things happen when you try to add the project to the source safe.

Although you can still view to file on the local web server, the excluded
file is no longer considered as part of the project when you attempt to do
any action targeted to "the project".

"Gabriel Magaña" <no-spam@no-spam.com> ¼¶¼g©ó¶l¥ó·s»D:O4GWafwPGHA.4044@TK2MSFTNGP15.phx.gbl...
>> Or you might just change it back later.
>
[quoted text clipped - 3 lines]
> Projects extension), so there is no such thing as excluding the file and
> then renaming back to the original name without including it again.
Evian Spring - 17 Mar 2006 15:56 GMT
For your coment:
Actually I think "renaming when a file is taken out of a project" is a
right

We have a "build.props" file for our NANT script.
This prop is different for every developer because they all have a
different working directory on their machine.
We do not want to include this file in the solution but it needs to be
at the root of the project.
Now if you rename it to .exclude, NANT will give you a compilation
error that builds.prop doesn't exists.

So it's not a good idea to rename....it's a catch 22

They should create a .exclude file that list all the files to be
excluded.......not renaming the actual file

Also you rename an image for an example.....How can a browser know a
.exclude is a jpg for example?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.