R# 2.0 | ASP.NET 2.0 | Class files in App_Code directory


I have been an avid R# 1.X user since the release of R# for VS2003, and have had no problems - in fact, I don't think I could have developed without it!

This week, I began my first ASP 2.0 / R# 2.0 / VS2005 project. All started well, but I have come across a serious flaw, which I don't understand:

1. I started my asp.net 2.0 app by creating a few web forms. Resharper works perfectly for my Code-Behind pages (e.g. Default.aspx.cs). No problems there.

2. Next, I attempted to create a simple class (e.g. MyClass.cs) in the root directory. VS2005 alerted me that I should be placing classes in the App_Code folder, and asked me to do so. I agreed, and my class appeared in the App_Code folder.

3. I opened up the new class, and immediately noticed that Resharper was not being "used". No error/warning strip down the right side, no R# intellisense, no on-the-fly error checking, nothing.

4. I went back to my aspx code-behind file to be sure and yes, Resharper was working there. In this code-behind file, I typed out the code to create an instance of my new class (e.g. MyClass c = new MyClass()). Resharper colored it red and said it could not find the type 'MyClass', even though is was definitely in the App_Code directory. In fact, I built the solution and tested it out on my web server and MyClass was indeed working with my aspx file.

So my questions are:
*Is this a bug or does R# not support simple class files in the App_Code directory?
Am I doing something wrong?*

R# 2.0 DOES work for simple classes in a C# Library DLL project, but i want all my code together. I have been through the options and property pages of Resharper and see no reason why my class file is being ignored.

Help please!

Please sign in to leave a comment.