How come classes in subfolders in my App_Code folder are not being found correctly?

后端 未结 6 1493
野性不改
野性不改 2020-12-15 00:47

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 fou

6条回答
  •  半阙折子戏
    2020-12-15 01:28

    Is it possible that you haven't set the folder as an application in IIS (or your web server)? If not, then the App_Code that gets used is that from the parent folder (or the next application upwards).

    Ensure that the folder is marked as an application, and uses the correct version of ASP.NET.

提交回复
热议问题