dotnet / dotnet/efcore

Can't generate a migration bundle when using IronPdf for Linux. The "GenerateBundle" task failed unexpectedly.

Open
#27,753 5 comments 0 reactions 0 assignees View on GitHub
area-migrations customer-reported
Dominant language
C#
Stars
14.8k
Forks
3.4k
PR merge metrics
PR metrics pending

Description

Hi,

We have a .NET 6 Web Api project that uses the package **IronPdf.Linux (Version 2022.3.5084)**.

The library is working fine for its purpose, that is, to generate PDFs from HTML.

The problem we're seeing is related to how IronPdf Linux integrates with our build pipeline in Azure Devops, specifically when the pipeline is generating the EF Core migration bundle.

Our build agent runs Linux (Ubuntu 20.04).

We're using the following command to generate the bundle:

`dotnet ef migrations bundle -v -o $(Build.SourcesDirectory)/migrations/document_efbundle `

The error that we get is:

```
document_efbundle -> /tmp/l0ksr4nb.zn5/bin/Debug/net6.0/ubuntu.20.04-x64/document_efbundle.dll
/usr/share/dotnet/sdk/6.0.201/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Publish.targets(898,5): error MSB4018: The "GenerateBundle" task failed unexpectedly. [/tmp/l0ksr4nb.zn5/document_efbundle.csproj]
/usr/share/dotnet/sdk/6.0.201/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Publish.targets(898,5): error MSB4018: System.ArgumentException: Invalid input specification: Found entries '/tmp/DOTNET_CLI_HOME/.nuget/packages/ironpdf.native.chrome.linux/2022.3.5075/runtimes/linux-x64/native/swiftshader/libGLESv2.so' and '/tmp/DOTNET_CLI_HOME/.nuget/packages/ironpdf.native.chrome.linux/2022.3.5075/runtimes/linux-x64/native/libGLESv2.so' with the same BundleRelativePath 'libGLESv2.so' [/tmp/l0ksr4nb.zn5/document_efbundle.csproj]
/usr/share/dotnet/sdk/6.0.201/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Publish.targets(898,5): error MSB4018: at Microsoft.NET.HostModel.Bundle.Bundler.GenerateBundle(IReadOnlyList`1 fileSpecs) [/tmp/l0ksr4nb.zn5/document_efbundle.csproj]
/usr/share/dotnet/sdk/6.0.201/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Publish.targets(898,5): error MSB4018: at Microsoft.NET.Build.Tasks.GenerateBundle.ExecuteCore() [/tmp/l0ksr4nb.zn5/document_efbundle.csproj]
/usr/share/dotnet/sdk/6.0.201/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Publish.targets(898,5): error MSB4018: at Microsoft.NET.Build.Tasks.TaskBase.Execute() [/tmp/l0ksr4nb.zn5/document_efbundle.csproj]
/usr/share/dotnet/sdk/6.0.201/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Publish.targets(898,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [/tmp/l0ksr4nb.zn5/document_efbundle.csproj]
/usr/share/dotnet/sdk/6.0.201/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Publish.targets(898,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) [/tmp/l0ksr4nb.zn5/document_efbundle.csproj]
Microsoft.EntityFrameworkCore.Tools.CommandException: Build failed. Use --verbose to see errors.
at Microsoft.EntityFrameworkCore.Tools.Commands.MigrationsBundleCommand.Execute(String[] args)
at Microsoft.EntityFrameworkCore.Tools.Commands.CommandBase.<>c__DisplayClass0_0.b__0(String[] args)
at Microsoft.DotNet.Cli.CommandLine.CommandLineApplication.Execute(String[] args)
at Microsoft.EntityFrameworkCore.Tools.Program.Main(String[] args)
Build failed. Use --verbose to see errors.
```

Are you aware of this issue? Is there a fix or workaround?

### version information

.NET SDK 6.0.201
EF Core .NET Command-line Tools 6.0.3
IronPdf.Linux: Version 2022.3.5084
Operating system: Linux (Ubuntu 20.04).

### steps to reproduce

- Use this code: https://github.com/leodip/IronPdfTest

- Start an Ubuntu (20.04) machine - maybe other Linux distros will produce the same output

- Install the .NET SDK and .NET EF Core Tools in Ubuntu

- Go to the folder where `IronPdfTest.csproj` is.

- Use this command:

`dotnet ef migrations bundle -v -o /tmp/bundle`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.