The type or namespace name app_code does not exist in the namespace in visual studio 2015

the type or namespace name 'app_code' does not exist in the namespace in visual studio 2015

Here we will discuss how we will resolve the issue 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 web form 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 in visual studio 2015
the type or namespace name ‘app_code’ does not exist in the namespace in visual studio 2015

the type or namespace name ‘app_code’ does not exist in the namespace in visual studio 2015

Also, you can read:
Steps to create Azure WebJobs for SharePoint online and deploy in Microsoft Azure

Create new team project Team Foundation Server (TFS) Visual studio 2015

Create Custom Action Group using Visual Studio 2015 for SharePoint 2016


Solution:
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 in visual studio 2015
the type or namespace name ‘app_code’ does not exist in the namespace in visual studio 2015

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


You May Also like the Following SharePoint Online Tutorials:

About 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 SharePointSky.com

View all posts by Bijay Kumar →