The Studio project is not being published due to following random errors - Error CS0246:The type or namesspace name 'GlobalConstantsNamespace' could not be found (are you missing a using directive or an assembly reference?). Error CS0246:The type or namesspace name 'GlobalVariablesNamespace' could not be found (are you missing a using directive or an assembly reference?) although these namespaces are present in the imports and show no errors.
In order to solve this, follow one of the below approaches:
- Use the "Remove Unused" functionality in UiPath Studio to remove unused variables or constants
- Rename the global variables/constants to include the full namespace. From "variableName" to GlobalVariable.variablename (the same principle applies for constants)
- Upgrade UiPath Studio to the latest Enterprise version available at the time of reading this article.
Read more about global variables and constants.