Monday, September 17, 2018

The User Control has caused a compilation error

After moving some code into my testing environment, I received the following error:


Message: The User Control ESSActivityPicker.ascx has caused a compilation error. To view details about this error, enable debugging in the web.config file or view the Windows event logs.

Source: System.Web

Exception details:

c:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\ep\ESSActivityPicker.ascx.cs(33): error CS0234: The type or namespace name 'EPGlobalParameters' does not exist in the namespace 'Microsoft.Dynamics.Portal.Application.Proxy' (are you missing an assembly reference?)

at System.Web.Compilation.AssemblyBuilder.Compile()
at System.Web.Compilation.BuildProvidersCompiler.PerformBuild()
at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath)
at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean ensureIsUpToDate)
at System.Web.UI.TemplateControl.LoadControl(VirtualPath virtualPath)
at Microsoft.Dynamics.Framework.Portal.UI.WebControls.AxUserControlUpdatePanel.LoadControl()

Now, the reason for moving code was to fix this control and fix the error listed above.  When I opened the control up on VS 2010, line 33 is commented out and should not be in error.  When I compiled in VS, it compiled just fine.

After searching for a while I finally gave up and went on my EP server.  I browsed out to the 'ep' folder listed in the error and checked the file.  Sure enough, my changes to code were NOT reflected in this file. 

I simply edited the file, commented out the code, and then tried EP again.  It worked!  No issue at all any more.