Tip: Compiler internal error with 'Method not found' due to old Runtime

Tip: Compiler internal error with 'Method not found' due to old Runtime

  

Symptoms:

Sometimes, after an upgrade or revision patch, when compiling an espace you may get an internal compiler error, with an error message stating that a specific method was not found in the "OutSystems.HubEdition.RuntimePlatform" namespace, like:

Actions.cs(157,5): error CS0117: 'OutSystems.HubEdition.RuntimePlatform.DBHelper' does not contain a definition for 'NewExecuteSimpleQuery'

or

ExtendedActions.cs(485,4): error CS0117: 'OutSystems.HubEdition.RuntimePlatform.DBHelper' does not contain a definition for 'ExecuteNonQueryDontCleanParameters'

or

Blocks\Common\Common.Menu.ascx.cs(549,53): error CS0117: 'OutSystems.HubEdition.RuntimePlatform.Web.WebScreen' does not contain a definition for 'isSecure'


This generates a compilation error that prevents you to publish your espace, and it can occur either while publishing with Service Studio, or directly through the Service Center.

Cause:

This error occurs because an older version of the OutSystems Runtime Platform assembly is included in the compilation process. How can this be?

Well, there are two basic scenarios that renders this exact same situation. Either the OutSystems.HubEdition.RuntimePlatform.dll is being included in an extension and deployed in the applications binary folder, or there's a producer espace that's not been published since the last server upgrade/revision patch. Although the latter is less common.

Both the scenarios will force an older version of the OutSystems.Hubedition.RuntimePlatform.dll into the compilation process of your espace, generating a broken reference to the OutSystems Runtime interface.

Resolution:

In the case of older espaces that have not been published since the server upgrade, the obvious solution if to republish your producers before the consumers. If you're using OutSystems Platform 4.X or greater, I recommend using the solutions to do just that.

In the case of the included assembly in the extension you need to exclude it from it. I using the Service Center details page of the extensions, in the dependencies tab, to identified which extension has the OutSystems Runtime Platform assembly included. Then, edit the extension with the Integration Studio, select the included assembly and exclude it. Please check for others system wide assembly that should not be included as well, like:

OutSystems.HubEdition.RuntimePlatform.dll

OutSystems.HubEdition.SMS.dll

OutSystems.HubEdition.WebWidgets.dll

OutSystems.HubEdition.MQInfo.dll

OutSystems.HubEdition.MobileWidgets.dll

OutSystems.HubEdition.MobileWidgets.Adapters.dll

OutSystems.HubEdition.Common.dll

OutSystems.Activation.dll

GotDotNet.ApplicationBlocks.Data.dll


Hope this information helps tracking down some of these errors.

Cheers

-----------------------------------------------------
Best Regards

Miguel Simões João