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.

Bijay Kumar

I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site SPGuides.com

>