Last post Dec 10, 2009 08:53 AM by equalizer700
Dec 08, 2009 04:31 PM|equalizer700|LINK
I wrote a validator control that overrides the CompareValidator. I originally had the source in the root souce directory, and compiled the app while it was in there. Of course the app could not find it, so I then moved it to the App_Code directory. Now
when I run the app I get:
CS0433: The type 'CustomWebControlsLibrary.NumericValidator' exists in both 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\4174add5\84dd6438\assembly\dl3\1cc3dd2d\2719ebed_4578ca01\Blue
Ribbon 2011 ASPX.DLL' and 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\4174add5\84dd6438\App_Code.kpebdz_c.dll'
I have deleted the
Temporary ASP.NET Files\root\ directory and recompiled, and I tried rebooting and clearing my browser cache, but I can't seem to make this error go away.
I have another validator control that has always been in the App_Code directory, and it works fine.
Has anyone else seen this, or know how to fix it?
Dec 08, 2009 04:38 PM|integrasol|LINK
Dec 08, 2009 05:01 PM|equalizer700|LINK
Thanks for the suggestion.
No go. Xcaclsl seems to have worked (there were no error messages), but the error is still there.
Dec 08, 2009 06:34 PM|jkirkerx|LINK
It stills see's the old compiled code, you have to delete the old code file in the folder in says, or rename the app in the new location, and leave the old stuff behind.
Dec 09, 2009 12:58 PM|equalizer700|LINK
I renamed the app source code, changed the class name, changed the namespace, and changed the toolboxdata, and still get the same error, with the new name. The source file only exists in one place, and I only changed the name in one source file and only
in those places. The source file name is not the same as the class name.
Compiler Error Message:
CS0433: The type 'CustomWebControlsLibrary.NumberValidator' exists in both 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\4174add5\84dd6438\assembly\dl3\1cc3dd2d\6056f7dd_e678ca01\Blue Ribbon 2011 ASPX.DLL' and 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary
I searched my hard drive for the name of the duplicate. It was found in these source files::
'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\4174add5\84dd6438'
as App_Code.psob4z4.1.cs, App_Web_l5qqkddu.2.cs, and App_Web_page1.aspx.cdcab7d2.3896xryi.0.cs. The page1 file is where it is referenced, the source code is in the App_Code directory, but it is only there once.
'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\fbe21d13\9b3a366c' as App_Code.fhr4wbzp.1.cs
I previously deleted the entire
'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\' directory
Anyone know how Visual Studio manages these? This is crazy!
Dec 09, 2009 05:19 PM|jkirkerx|LINK
I've had that happen to me before, where I started with app_code, and then moved it into a dll project. You did the right thing, it's just more detailed and harder to find than I anticipated. Break out your magnifying glass, and search harder, use the find
word program to list the words below
It's this type it's shouting about, exclude one of files belowin your project to narrow it down. Don't worry about cleaning up, asp.net will do it for you.
Find this statement - CustomWebControlsLibrary.NumberValidator
Blue Ribbon 2011
I don't have your project in front of me, be patient, try one more time.
Dec 10, 2009 08:37 AM|equalizer700|LINK
I'm not sure what you are suggesting I do. How would I exclude one of the files?
Dec 10, 2009 08:53 AM|equalizer700|LINK
I fixed it.
I copied the source out of the control, deleted the control from App_Data, created a new class in App_Data, copied the origingal source into the new control, and all is well...it works fine. Visual Studio must have had some erroneous metadata somewhere
that got deleted when I deleted the original control.
Thanks to everyone for the suggestions.