Thursday, December 31, 2015
Unable to Reference classes in App_Code or other folder in Web Application Project
So if you google "unit testing on web application projects" you'll get discussion on using the "web application" project instead of "web site" project type. I won't retread that here, its been done elsewhere:
The other common solution to the problem is changing the project's targeted .NET version.
But if that still doesn't work, it could be the content type on your files. This often happens when you have folders in your project (like App_Code) and add new items to those folders. Right click on those files in your solution explorer and select Properties.. --> change their type from "Content" to "Compile" and your reference should succeed:
Here is a link to more discussion and a post that had the answer I was looking for the whole time: