Not able to compile the library

I am getting the below error when i try to publish my library. How do i resolve this?
Unexpected error has occurred during the library compilation process:
The assembly compilation returned the following errors:

  • The type or namespace name ‘GlobalConstantsNamespace’ could not be found (are you missing a using directive or an assembly reference?)
  • The type or namespace name ‘GlobalVariablesNamespace’ could not be found (are you missing a using directive or an assembly reference?)

@rpn_mail

I hope
Your system packages are above 22.10 version?

Alternately can you try renaming the project.json and and then reopen the project and check

Hope this helps

Cheers

Hi @rpn_mail
This error occurs when the project is unable to find the reference to the namespaces GlobalConstantsNamespace and GlobalVariablesNamespace. Here are some steps you can take to resolve the issue:

Make sure that the namespaces GlobalConstantsNamespace and GlobalVariablesNamespace are added in your project.

Check if you have referenced the correct assemblies that contain the definitions for the above namespaces. You can do this by going to the Dependencies section of your project and verifying that the appropriate packages are installed.

Check if there are any typos or spelling errors in your code that may be causing this error.

Try rebuilding the project to see if it resolves the issue.

If none of the above solutions work, try creating a new project and copying over the code to see if it resolves the issue.

I hope this helps you resolve the error.

Hi @rpn_mail - Are you using custom library? It could be because of .Net framework version incompatibility issues. Please check below link

c# - Getting “type or namespace name could not be found” but everything seems ok? - Stack Overflow

c# - The type or namespace name could not be found - Stack Overflow

1 Like

I only had the basic packages, and couldn’t figure out the .Net mismatch, so I made a new process, and copied the xaml files from my broken one into the new one and the new one worked.
Side-note: When I tried to run the new one, it did say I already had a process running, (I had badly closed a running execution before, so I guess some of it never stopped running?) so maybe that corrupted or confused the packages. I closed UiPath and stopped all UiPath processes in Task Manager and then it was all good.