Reference app_code classes in web application project

add-references-dialogapp-codeasp.net

I have created an asp.net website, with the accompanying app_code folder.

In the same solution I added a web application project, and I want to use the classes that are in the website app_code folder.

I tried adding a reference, and then adding the project (the website), but the list of project is empty…
Thanks.

Best Answer

You are doing it wrong. Create a class library project and move all those classes from the app_code folder to the new project. Then reference this project from both website and web application project.