Delete a class from a project

I'm developing an app in Visual Studio.net using Microsoft Visual C++ .NET. 

I need to delete a class from a project. 

Deleting the .h and .cpp files and all other references in the source code 
to the class does not remove the reference to the class and it's file names 
from the project. It still appears in the class view and the compiler will 
still look for the files resulting in an error. 

VC++ 6.0 had an awkward way of doing it using the class wizard.

I have no idea of how VS.net handles it. 

Anyone ever completely delete a class from a project successfully in VS.net.

Any thoughts would be appreciated.

Thanks, Neil
0
NeilB (111)
3/28/2006 8:29:03 PM
vc.mfc 33608 articles. 0 followers. Follow

7 Replies
442 Views

Similar Articles

[PageSpeed] 8

> It still appears in the class view

Delete the .clw file.


Remove .h/.cpp from the project. Did you remove/rename .h and .cpp file
on the disk as suggested earlier? This will tell you where the class is
being used as you will get compile error. Just search your code
(*.h/*.cpp) for the class name. That ought to do it.

----
Ajay Kalra
ajaykalra@yahoo.com

0
ajaykalra (6842)
3/28/2006 8:37:26 PM
I deleted the .h and .c/.cpp files from the project folder. Did a search 
(Find) on the "Current Project" for each of the following:
CBudgetRecord
BudgetRecord.h
BudgetRecord.c
BudgetRecord.cpp

Each of the searches returned nothing found. 

The good new is that the class CBudgetRecord no longer appears in the class 
view.

The bad news is the the compiler still gives the following errror:
 *********************************************
ActBooks Application fatal error C1083: Cannot open source file: 
'BudgetRecord.cpp': No such file or directory
*********************************************
But only in a "Release Configuration".
Compiles fine in a "Debug Configuration".

I also tried deleting the "Release" folder before rebuilding the app.

Any other thoughts on the situation????

Thanks for you help (and Patience),
Neil

"Ajay Kalra" wrote:

> > It still appears in the class view
> 
> Delete the .clw file.
> 
> 
> Remove .h/.cpp from the project. Did you remove/rename .h and .cpp file
> on the disk as suggested earlier? This will tell you where the class is
> being used as you will get compile error. Just search your code
> (*.h/*.cpp) for the class name. That ought to do it.
> 
> ----
> Ajay Kalra
> ajaykalra@yahoo.com
> 
> 
0
NeilB (111)
3/28/2006 10:17:02 PM
Good News......... I found the culprit and how to get to it.
The problem was in the .vcproj file (.dsp on earlier versions of the tool). 
I opened it using "NotePad" and found the references to the CBudgetRecord 
file. Deleted the <File> commands that referenced them and it cleared up the 
compiler problems.

Of course I still had to search the current project for any references to 
the .h, .c and .cpp files as well as to the class name CBudgetRecord. 

Thanks for all your help.
You guys are great..........
Neil


"Ajay Kalra" wrote:

> > It still appears in the class view
> 
> Delete the .clw file.
> 
> 
> Remove .h/.cpp from the project. Did you remove/rename .h and .cpp file
> on the disk as suggested earlier? This will tell you where the class is
> being used as you will get compile error. Just search your code
> (*.h/*.cpp) for the class name. That ought to do it.
> 
> ----
> Ajay Kalra
> ajaykalra@yahoo.com
> 
> 
0
NeilB (111)
3/30/2006 4:15:01 PM
You did not have to open .vcproj in Notepad. That is actually a bad
idea. Do everything in IDE because that takes care of everything.

---
Ajay

0
ajaykalra (6842)
3/30/2006 4:23:05 PM
Could you tell me very specifically how you would do this in IDE? 

If I open the .vcproj file from File | Open | File   or File | Open | 
Project   I can't get any visibility to the file names that are causing the 
problem.

Thanks, Neil
"Ajay Kalra" wrote:

> You did not have to open .vcproj in Notepad. That is actually a bad
> idea. Do everything in IDE because that takes care of everything.
> 
> ---
> Ajay
> 
> 
0
NeilB (111)
3/31/2006 6:21:04 PM
> If I open the .vcproj file from File | Open | File   or File | Open |
> Project   I can't get any visibility to the file names that are causing
the
> problem

If the file is included in the project, you will see it in solution
explorer. Dont you see the file?

--
Ajay Kalra [MVP - VC++]
ajaykalra@yahoo.com



0
ajaykalra (6842)
3/31/2006 6:34:44 PM
I've already clean up the original problem file so its not there anymore.

Tried deleting another class that I didn't need. Use the solution explorer 
project source file list to delete it. Everything worked okay when I compiled 
and in class view (after reopening the solution). 

When I went to check in the .vcproj file I still found a reference to the 
deleted class in the "Filters" commands.  I deleted it there also and 
recompiled okay.

Thanks for all your help. I really appreciate it.
Neil

"Ajay Kalra" wrote:

> > If I open the .vcproj file from File | Open | File   or File | Open |
> > Project   I can't get any visibility to the file names that are causing
> the
> > problem
> 
> If the file is included in the project, you will see it in solution
> explorer. Dont you see the file?
> 
> --
> Ajay Kalra [MVP - VC++]
> ajaykalra@yahoo.com
> 
> 
> 
> 
0
NeilB (111)
4/1/2006 2:30:02 PM
Reply:

Similar Artilces:

Best in Class Visual Reports for Mgmt
Hi, I am looking for some examples of 'Best in Class' visual reports for hi-level management use. Specifically, reports that demonstrate the project status in both financials (ex: EVA) and overall progress. I know there are some of the standard MS Projects reports, but my manager is looking for any additional reports that have favorable reviews. Thanks so much for your help! Download the free 30 day trial version of DecisionEdge. There's a lot of sample reports there that are all validated by industry. "shasta1987" wrote: > Hi, > > I...

how can I delete name
Hi, How can I delete or change the name that appears at the top of any email that I am trying to print out. I have outlook 2003. Cheers Lenny ...

Yahoo text has multiple deletions since '08 Word was installed
Version: 2008 Operating System: Mac OS X 10.5 (Leopard) Processor: intel I've probably made some basic error with installing Office: mac 2008. Since doing so, I can't read much of anything on Yahoo. Many letters are missing; some are squished together. Is there are a problem with font compatibility? I'd welcome any suggestions on how to fix the problem. Otherwise, I'll need to uninstall and try again, which I suppose is not a bad initial strategy. Please help. Simply shut the computer down, turn it off, then restart. When you restart, you force a rebuilt of the font caches, ...

MS Project for Mac
Operating System: Mac OS X 10.5 (Leopard) Processor: Intel I saw something recently about MS Project for Mac now if you use Entourage. However I cannot seem to locate where I found this information or the link, etc. Has anyone else seen this? Does this exist or is the Entourage 2008 version now have "MS Project" type features? Thoughts? On Wed, 10 Jun 2009 12:12:11 -0400, nprefer@officeformac.com wrote: > Operating System: Mac OS X 10.5 (Leopard) > Processor: Intel > > I saw something recently about MS Project for Mac now if you use Entourage. > However I cannot s...

Business Portal Project Timesheet date header dissappear when scroll down
In Business Portal Project timesheet, when scroll down the cost category, the date header is dissappear from the page, is this a design fault ? For project will large no of cost category, it is very in-convenient as we did not know whether the hours being keyed into the correct date. Please advise. Thanks ...

How Do I Delete My Local .PST Calendar?
How do I delete the calendar in my local .pst file? When I create new .pst files, there is no calendar in it. But if I then add a calendar to this .pst file, it screws up which caldendar my meeting requests go into. So I would like to delete the local calendar and just keep the service calendar. Ernest Maw wrote: > How do I delete the calendar in my local .pst file? > > When I create new .pst files, there is no calendar in it. But if I > then add a calendar to this .pst file, it screws up which caldendar my > meeting requests go into. > > So I would like to delete...

Class reuse problem
Hi. Being relatively new to OOP programming, I've managed to 'get things working' but always struggled with the best way of doing it. Now I'm struggling with a problem that I hope you can help me with. Simply, I'm trying to write two app's - one for a Windows Desktop and the other for Windows Mobile. Both performing similar functions on different copies of the same data. I have 3 projects. Win desktop, Win Mobile and common classes. For the purpose of this post, I shall be referring to a common class called Person. Currently, the desktop data is held in an Access...

Delete Printer Bubble
I've recently updated to Windows XP, and one of the print "features" is a pop up bubble that tells me a document being printed has been sent to the printer, as if I didn't already know. How can I disable that printer bubble message? ...

OK to delete old ,net framework?
Addremove programs shows .net framework 1.1, 2.0 sp2, 3.0 sp2, and 3.5 sp1. Can I delete the old ones? Thanks. New versions of .NET Framework do not supersede older versions. I.E., you may have a program that requires V:2 SP2, but it won't run on any other version. So, the short answer is no. -- Bruce Hagen MS-MVP [Mail] Imperial Beach, CA "BobG" <bobgardner@aol.com> wrote in message news:21f2da84-d70f-4dd9-93a2-7e2f1a0895ea@e37g2000yqn.googlegroups.com... > Addremove programs shows .net framework 1.1, 2.0 sp2, 3.0 sp2, and 3...

Deleting / Disabling the Links
Hello, I have got 2 queries. First one: I have got a workbook which has so many links that points to various unknown files. I have deleted some of the links by manually scanning the various sheets. but still i am left with some links which i could not find manually.. I have even cleared all the names in the workbook. Still no use. I looked into Edit->Links, i can see one link, but unfortunately there is no delete button with which i can remove the link. Can anybody help me how to remove the unknown link in the book? Thanks. Second one: Continuing from my prev question, wheneve...

How can I recover deleted mail?
Hi guys I was working on a file in my drafts folder and presses X expecting it to ask if I would like it saved but it did not. Is there a way of recoveringf it? Is there a cache of deleted files or a location where the document could be? Win2K Pro, IE6 SP1, Outlook Express Many thanks Ben Hi - I don't believe this is possible, but note: This is a group to support Outlook from the Office group of programs. Outlook Express is a part of Internet Explorer and is a quite different program, despite its similar name.. You will probably get a faster and more expert answer if you post th...

How to delete an opportunity
Hi there After testing our new CRM we want to go live with it. While cleaning all entries and deleting all testopportunities i figured out, that some opportunities can't be deleted. It seems that these are the ones where a contract is linked to. But I neither can delete a contract nor a opportunity. Does anyone has an idea how to do that? For statistics and reports this would be helpfull. Greetings ------=_NextPart_0001_17916810 Content-Type: text/plain Content-Transfer-Encoding: 7bit <Marc@discussions.microsoft.com> wrote: > After testing our new CRM we want to go live ...

How do I delete pages in Excel? Keeps printing blank pages at end.
I'm printing charts in Excel. Some of them are adding blank pages at the end of the charts. How do I get rid of these? Several ways: 1) Change the location of the chart to have its own sheet. Do this by right clicking the chart, go to "Location" and putting it on it's own sheet. Then you should be able to print it by itself without any white stuff. 2) Make sure that the page breaks are defined well. Go to View -> Page Break Preview . From there, you can move around the blue lines to determine your page breaks. Then, when you're printing it, make sure that you c...

Can't add file to VC7 project
I'm sure this is a very idiotic question, but I can't seem to add file.h and file.cpp to my project.. -Both files are in the same folder with the other project files. -I did a File/add existing item/ then picked the files from the dialog. -Clicked open. But then Solution Explorer did not show the files??? (It does work OK on another computer with same software.) Why might this be??? Thanks, E-Jo Hello Everett, > I'm sure this is a very idiotic question, but I can't seem to > add file.h and file.cpp to my project.. > -Both files are in the same folder with the ...

Deleted Items Retension
I have the Deleted Items Recovery set to 30 days. However, if someone uses Outlook 2003 (Exchange 2003 back-end) and selects the "Recover Deleted Items" option and then selects the "Purge Selected Item" does this disregard the 30 day recovery retension and then permanently remove the item? If so, can the item be recovered from the Exchange Server Manager? TIA. Yes it does and no you cannot recover it. Once the item has been purged, its gone. I don't care for that myself. "Scott" <Scott@discussions.microsoft.com> wrote in message news:2806ACFF-B3...

Need Help with Deleting Duplicates
I have a client that uses excel to manage their email addresses. When they send out their newsletters they have an opt out option for people that decide that they don't want the newsletter anymore. This opt out option sends my client an email with the address to be removed. Is there a way to copy the removal list into the list of all the addreses and then completely delete the duplicate entries so the email addresses are removed from the list? Thank You! Chip Pearson has instructions for tagging duplicate entries in a list: http://www.cpearson.com/excel/duplicat.htm#TaggingDuplicat...

How to restore a deleted Folder
Hi I have accedently deleted my receiving folder. Is it possible to restore it. If yes how can I restore it. Thank you -- Viper It should show up as a subfolder of your Deleted Items folder then unless you've already confirmed it to delete it permanently. Restoring methods completely depend on your version of Outlook and type of mail account that you are using. Restoring from backup will always work of course. -- Robert Sparnaaij [MVP-Outlook] Coauthor, Configuring Microsoft Outlook 2003 http://www.howto-outlook.com/ Outlook FAQ, HowTo, Downloads, Add-Ins and more http://ww...

Need Help with Delete SQL for Access
Hi, I have an MS Access Table that I use to store log information and it looks something like this: tblLog ID Job SN Message Date 1 script1 abc123 Failure 1/1/2007 2 script2 abc123 Failure 1/1/2007 3 script2 abc123 Success 1/2/2007 4 script2 def456 Success 1/2/2007 5 script1 def456 Success 1/9/2007 6 script1 def456 Failure 1/10/2007 7 script1 abc123 Success 1/10/2007 I would like to create a query that would delete all of the old information. In other words, I only want to keep the data from the last time the script was run. If I were going to select the data, I would use something like ...

How to cancel assignment delete requests?
Hi to all, When a WBS is approved by PMO, resources can't make any changes to this WBS. The most importang change in Project Server is deleting a task which is assigned to a resource by resource. Since I can't handle this permission through 'Team Members' groups global or category permission, the best way is to write an Event Receiver. I wrote a class which inherits from StatusingEventReceiver and override the OnAssignmentDeleting method. Method contains only e.CancelReason = "SampleReason"; e.Cancel = true; base.OnAssignmentDeleting(contextInfo,...

Can't delete items from my inbox
I use Windows XP and Office 2000 at work. Recently, I get the following message when I attempt to delete items from my inbox in Outlook: "The messaging interface has returned an unknown error. If the problem persists, restart Outlook". I have run detect and repair to fix this problem as well as re-installing Office, but the message still appears and I can not delete items from my inbox. I can't even drag them to the deleted items folder. Any ideas? Thanks, Mark L. ...

Error serializing derived Custom Collection Class
I am receiving an error stating that File or Assembly name <filname.dll>, or one of its dependencies, was not found In one assembly I have three abstract classes In another I have three derived classes from the abstract classes The 1st class contains the 2nd class The 2nd class is a custom collection for the 3rd class when I serialize the 1st class I am receiving the error. The classes look like the following: Abstract classes: using System; using System.Xml.Serialization; namespace AbstractClasses { public abstract class ContainerBase { private LocationsCollectionBase _loc...

Taskbar Deletion
I can not get rid of this bloody thing! "VIRUS PROTECT ANTI-SPYWARE PROTECTIION" I do not need it, didn't down load it and now I can't get rid of it in my tray. It just keeps blinking and won't go away. And yes I've tried to get rid of it several different way. I wonder if it isn't the bloody virus. It's keeps stating "System Alert". I have ran my other programs and there is nothing wrong with my computer. All clear, virus, and spyware no problems there. The company is located in Riga Lativia???????? PLEASE HELP ME! ...

Another post deletion
Hi All...... It did it again.......I put up a post at 2:15 this afternoon and just now checked for it here at 6:10 pm and it's not there........yet when I check the group from my Roadrunner newsserver it's there......indicating that it made it to msnews and got downloaded to Roadrunner but then got deleted from msnews........who knooows what will happen to this one, "the Shadow"? Any body else having their posts deleted like this? Vaya con Dios, Chuck, CABGx3 Chuck, The server farm at MS is being flooded with messages from the virus that is going around. That slows th...

deleted components
somehow my major components of excel have been deleted, anc i can no longer run the program. i can still find listings of excel when i explore, but there's nothing there. is there any way that i can download the major components? i looked at microsoft, but the downloads were just accessories. Can't you re-install using your original disk? "robbie barker" <barker_rl@yahoo.com> wrote in message news:0ad401c398a1$7de3e5f0$a601280a@phx.gbl... > somehow my major components of excel have been deleted, > anc i can no longer run the program. i can still find > l...

is there a way to automatically delete NDRs in the Queue
How can I automatically delete NDR messags in the queue? "North Coast Sea Foods" <jleonard@northcoastseafoods.com> wrote in message news:%23x22UXR%23GHA.4704@TK2MSFTNGP04.phx.gbl... > How can I automatically delete NDR messags in the queue? I don't think you can delete them automatically, but you can stop them being generated in the first place. In ESM, go to Global Settings/Internet Message Formats/Default/Properties/Advanced . The ones that are already queued will disappear in a few days' time. Lee. -- _______________________________________ Outlook Web ...