Click here to Skip to main content
15,908,626 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am getting the following error when I put class files in subfolders of my App_Code folder:

errorCS0246: The type or namespace name 'MyClassName' could not be found (are you missing a using directive or an assembly reference?)

This class is not in a namespace at all. Any ideas?
;)
Posted

1 solution

It happened because, you've moved out class file from its place.. It is givin you error because you've compiled your application when it wasn't moved.. Now build your ClassLibrary from App_Code and then add its reference to your application.. All the Best :)
 
Share this answer
 
Comments
Seyed Ahmad Mirzaee 8-Dec-12 3:35am    
I Use WebSite and Diffrent From Web Application
in Webiste I dont Have Refrence?!!
[no name] 8-Dec-12 3:43am    
If you dont have reference, please let me know why are you gettin error ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900