does not contain a definition for ...
Hi all.
I'm facing really strange problem, in one of my BLL files whenever I add method or property i get this message:
Code:
Error 1 'CPLogic.BLL.OrdersFaxGroups' does not contain a definition for 'GetFaxGroupForStatusCheck' C:\CouponphoneApps\CPFaxEngine\CPFaxEngine\CPFaxEngine\FaxEngine.cs 206 58 CPFaxEngine
I know that the method is in that file, i even able to build the application with success but when ever i try to lanuch it i get this message, the same thing happend to me yesterday in the same file, i ended up deleting it and copy its content again to new file with the same name. but now even that not working..
can someone please help me with this ?
Re: does not contain a definition for ...
Sounds odd. Maybe check the build order to make sure it isn't building the exe before the dll? Or maybe just delete the obj and bin folders and do a rebuild. Sometimes something gets corrupted there.
Re: does not contain a definition for ...
Hi.
Cleaning the build was the first thing I did, nothing helped, I ended up moving the project to another computer and things working fine now. I guess it's format time :)
Re: does not contain a definition for ...
Sometimes I have found a "clean solution" doesn't always work, especially if a file is stuck in a state in which it can't be deleted while VS is open. Sometimes manually deleting the obj/bin folders versus doing a "clean solution" from VS works.
Re: does not contain a definition for ...
I've seen this error happen when a method was called on an object, the solution in my case was that the object needed to be cast to a certain type.
But as you solved this case once by creating a new file, I tend to think like Matt that something wrong is happening when you build your application, its like if your file has already been built and is already in memory and won't be rebuilt even after being modified.