Packaging and compilation issue

Dear Team

Getting the Below error During Publish the Package.

Kindly Advise :slight_smile:

Compilation failed or was cancelled.

Unexpected error has occurred during the library compilation process:
The assembly compilation returned the following errors:

  • Assuming assembly reference ‘System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ used by ‘UiPath.Database.Activities’ matches identity ‘System.Data.Common, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ of ‘System.Data.Common’, you may need to supply runtime policy
    *** Unused extern alias.**

*** Unnecessary using directive.**

*** Combined length of user strings used by the program exceeds allowed limit. Try to decrease use of string literals.**

Hi @rajmailsave

Close the studio and re-open it and then please check the packages and update all the packages to the latest versions in manage packages option and make sure that you keep the Runtime Rule as Lowest Applicable Version and it will resolve the issue.

Please refer the below image.

Regards

@rajmailsave

  1. Update Packages: Update all UiPath packages, including ‘UiPath.Database.Activities’, to their latest versions using the Manage Packages window in UiPath Studio.
  2. Check Compatibility: Ensure that all package versions are compatible with each other, especially ‘System.Data.Common’. Resolve any version conflicts.
  3. Review Project Dependencies: Verify that all dependencies in your project are compatible. Update or find compatible versions if there are conflicts.
  4. Runtime Policy: If needed, supply a runtime policy for the assembly reference ‘System.Data.Common, Version=5.0.0.0’ in your project’s configuration files (e.g., app.config or runtimeconfig.json).
  5. Reduce String Literals: Decrease the use of string literals in your project to avoid exceeding the allowed limit.
  6. Clean and Rebuild: After making changes, clean your project and then rebuild it to ensure that any cached or outdated builds are resolved.