且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

应用程序无法识别App_Code VS 2010中的类文件

更新时间:2023-09-26 11:54:04

之所以发生这种情况,是因为,你已经移出了类文件它的位置..它是你的错误,因为你已经编译了你的应用程序,当它没有被移动..现在从App_Code构建你的ClassLibrary然后添加它的应用程序的引用..所有***:)

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?
;)

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 :)