Any classes I create in the /App_Code
or /App_Code/[subfolder]
don't have local intellisense.
That is - I have intellisense for system dlls such as string.[member] etc. But cannot get it to recogize any classes local to App_Code (including itself), or dlls referenced in the /bin folder.
Although I do have intellisense of inside the scope of a member-function. (ie. local variables or function parameters)
NB
IMO, you should move your code out of App_Code
. In .net 4.5 (and 4.0) your behind code is compiled to a dll, so I don't see any benefits to putting your code in App_Code
. If someone advises different, I am interesting in hearing.
With that said, create a folder or folders under your root project and put your code in there.
MyWebsite
- DataLayer
MyDataLayer.cs
Default.aspx
In this example, you will be able to access your classes DataLayer.MyDataLayer
Even better create a new library for code that is not needed in your aspx.cs code behind files.
New code files in App_Code will have the build action "Content", hence you got no intellisense. So right click your code file and click "Properties", in the property window change the "Build Action" to "Compile".
Then reopen your code file.
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