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?
You need to add codeSubDirectories to your compilation element in web.config
<configuration>
<system.web>
<compilation>
<codeSubDirectories>
<add directoryName="View"/>
</codeSubDirectories>
</compilation>
</system.web>
</configuration>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With