Skip to content

Build errors with dotnet SDK #14

@willie013

Description

@willie013

Hi @SE-Abdullah ,

First of all, these scripts have been really helpfull with developing CI pipelines for Uipath, thanks!
However, I am running into a weird issue. I used to build my package with the dotnet runtime with this install script:

- ./dotnet-install.ps1 -InstallDir "$env:CI_PROJECT_DIR\.dotnet" -Version '6.0.25' -Runtime 'dotnet'
- ./dotnet-install.ps1 -InstallDir "$env:CI_PROJECT_DIR\.dotnet" -Version '6.0.25' -Runtime 'windowsdesktop'

This worked fine with the following command to build the robot:

- . "$env:CI_PROJECT_DIR\UiPathPack.ps1" "$env:CI_PROJECT_DIR\project.json" -destination_folder "$env:CI_PROJECT_DIR\output_packages" -autoVersion

For a different bot with custom libraries, I need to add a custom library source to build the dependencies. Thus, I need the dotnet SDK. I installed it using:
- ./dotnet-install.ps1 -InstallDir "$env:CI_PROJECT_DIR\.dotnet" -Version '6.0.320'

Which seems to work fine:

$ dotnet --list-runtimes
Microsoft.AspNetCore.App 6.0.25 [C:\GitLab-Runner\builds\t2_kzDn3z\0\rpa\gitpipelines\gitpipelinesproject.dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.25 [C:\GitLab-Runner\builds\t2_kzDn3z\0\rpa\gitpipelines\gitpipelinesproject.dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 6.0.25 [C:\GitLab-Runner\builds\t2_kzDn3z\0\rpa\gitpipelines\gitpipelinesproject.dotnet\shared\Microsoft.WindowsDesktop.App]
$ dotnet --list-sdks
6.0.320 [C:\GitLab-Runner\builds\t2_kzDn3z\0\rpa\gitpipelines\gitpipelinesproject.dotnet\sdk]

However, I am getting these kind of build errors when running the pack script again:

INITIALIZATION: Loading xaml dependencies.
INITIALIZATION: Dependencies loaded. (13 ms)
COMPILER: Compiling final assembly.
COMPILER: Starting xaml documents compilation
Unexpected error has occurred during the library compilation process:
Unable to create activity builder for .dotnet\sdk\6.0.320\Sdks\Microsoft.NET.Sdk.Razor\targets\Rules\RazorConfiguration.xaml. Reason was 'Cannot create unknown type '{http://schemas.microsoft.com/build/2009/properties}Rule'.'.uipcli Error: 0 : Unexpected error has occurred during the library compilation process:
Unable to create activity builder for .dotnet\sdk\6.0.320\Sdks\Microsoft.NET.Sdk.Razor\targets\Rules\RazorConfiguration.xaml. Reason was 'Cannot create unknown type '{http://schemas.microsoft.com/build/2009/properties}Rule'.'.
Compilation failed or was cancelled.
Compilation failed or was cancelled.Failed to run the command. UiPath.CommandLine.Exceptions.CommandException: Packaging failed due to one or more errors. Message : Compilation failed or was cancelled. Error : at UiPath.Studio.ProjectPackager.Publish.Services.PublishService.PerformPrePackOperationsAsync(IWorkflowProjectModel projectModel, IPublishSettings settings)
at UiPath.Studio.ProjectPackager.Packager.Services.ProjectPackagerService.PrePackAsync(IPackagerHelperService packagerHelper, IWorkflowProject workflowProject, IPublishSettings publishSettings, ProjectRestoreResult dependencies)
at UiPath.Studio.ProjectPackager.Packager.Services.ProjectPackagerService.PackProjectExternal(String projectPath, UpdateProjectVersionEnum updateProjectVersion, PublishSettings publishSettings, IProgress1 progress, Action1 logEvent, IReadOnlyCollection1 packageSources, String destinationFolder, CancellationToken cancellationToken) Details... Message: Error : at UiPath.CommandLine.Services.Impl.PackService.PackProject(String projectPath, ProjectVersion currentVersion, String destinationFolder, PublishSettings settings, IEnumerable1 packageSources)
2/5/2025 12:49:48 PM Unable to Pack project. Exit code 1

Any clue what this might be? Even if I just build the simpler bot with the SDK instead of the runtime install, this issue occurs...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions