The type or namespace name ‘app_code’ does not exist in the namespace
Check out Best Alternative to InfoPath -> Try Now
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:
Right-click on the Code file (which is inside App_Code folder), then set Build Action to Compile like below.
Now if you will try to access, it will be accessible.
You may like following visual studio tutorials:
- The remote server returned an error 407 Proxy Authentication Required error in Visual Studio 2015/2017 in SharePoint Online
- SharePoint 2010 project templates missing in Visual Studio 2010
- SharePoint online visual studio 2015 workflow variable not available in various scopes
- The ExpressionTranslationBuildTask task failed unexpectedly SharePoint Visual Studio Workflow Error
- Invalid text value. A text field contains invalid data error in visual studio 2015 workflow in SharePoint Online
- Could not copy “obj\debug.exe” to “bin\debug.exe”. Exceeded retry count of 10. Failed.
- Generate .app file for SharePoint Apps using MSBuild and Visual Studio 2015
- Error occurred in deployment step Activate Features System.NullReferenceException Object reference not set to an instance of an object error in Visual Studio 2015 workflow SharePoint 2016
- SharePoint 2016 Project Template for Visual Studio 2015
- Unable to connect to the configured development web server error in visual studio 2013
This tutorial helps us to learn an issue the type or namespace name ‘app_code’ does not exist in the namespace.
Download SharePoint Online Tutorial PDF FREE!
Get update on Webinars, video tutorials, training courses etc.