I'm working on a Sharepoint 2013 project which has "suddenly" started producing an error in visual web parts onBuild or Deploy in Visual Studio 2015:
The files in question are:
EditFolder.ascx
EditFolder.ascx.cs
EditFolder.ascx.g.cs:
[GeneratedCodeAttribute("Microsoft.VisualStudio.SharePoint.ProjectExtensions.CodeGenerators.SharePointWebP" +"artCodeGenerator", "14.0.0.0")] private static System.Reflection.MethodInfo @__PageInspector_SetTraceDataMethod = global::ASP.mycontrol_ascx.@__PageInspector_LoadHelper("SetTraceData");
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)]
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)]
[GeneratedCodeAttribute("Microsoft.VisualStudio.SharePoint.ProjectExtensions.CodeGenerators.SharePointWebP" +
"artCodeGenerator", "14.0.0.0")]
private void @__PageInspector_SetTraceData(object[] parameters) {
if ((global::ASP.mycontrol_ascx.@__PageInspector_SetTraceDataMethod != null)) {
global::ASP.mycontrol_ascx.@__PageInspector_SetTraceDataMethod.Invoke(null, parameters);
}
}
[GeneratedCodeAttribute("Microsoft.VisualStudio.SharePoint.ProjectExtensions.CodeGenerators.SharePointWebP" +
"artCodeGenerator", "14.0.0.0")]
private void @__PageInspector_SetTraceData(object[] parameters) {
if ((global::ASP.mycontrol_ascx.@__PageInspector_SetTraceDataMethod != null)) {
global::ASP.mycontrol_ascx.@__PageInspector_SetTraceDataMethod.Invoke(null, parameters);
}
}
The error I get is:
Severity Code Description Project File Line Suppression State Error CS0400 The type or namespace name 'ASP' could not be found in the global namespace (are you missing an
assembly reference?) IMS SP2013 Folder Web Parts
C:\WebParts\IMS\IMS\IMS 2013\IMS SP2013 Folder Web Parts\IMS SP2013 Folder Web Parts\Edit_Folder\EditFolder\EditFolder.ascx.g.cs 868 Active
Is there something in the WEB config in IIS that might be causing this, or a setting in Visual Studio that has been changed somehow?