The type or namespace name ‘app_code’ does not exist in the namespace

This tutorial explains, how to fix the issue The type or namespace name app_code does not exist in the namespace which comes in visual studio 2015.

Recently I was trying to develop a provider-hosted add-in for SharePoint online site using visual studio 2015.

In the Asp.Net webform project, I have added an App_Code folder where I have added my class file. But when I was trying to access the code file in Default.aspx page or any other page, it was not accessible and will give an error like below:

the type or namespace name 'app_code' does not exist in the namespace

Right-click on the Code file (which is inside App_Code folder), then set Build Action to Compile like below.

the type or namespace name 'app_code' does not exist in the namespace

Now if you will try to access, it will be accessible.

You may like following visual studio tutorials:

This tutorial helps us to learn an issue the type or namespace name ‘app_code’ does not exist in the namespace.

Donwload Hub site pdf

Download SharePoint Online Tutorial PDF FREE!

Get update on Webinars, video tutorials, training courses etc.

>