Skip to content

Error with NuGet packing #741

@lukebakken

Description

@lukebakken

@Keboo @bording - if you have a second to look at this command and the output and provide just a smidge of guidance I would really appreciate it.

We build and publish this library using Debian Buster. Here's how the build image is provisioned, as a Vagrantfile - https://gist.github.com/lukebakken/676bb6d75e30aa5a0bc533f9af87a336

You can see that both dotnet and mono are on the image and I'm wondering if that has something to do with it? I'm going to try reproducing locally with and without mono ... but I think that's still required because net451 is a target.

Note that the shell script is run with -x so that each executed command is prefixed with + in the output. I have attached the full build output to the bottom of this issue.

dotnet pack ./projects/client/RabbitMQ.Client --no-build --configuration SignedRelease --version-suffix pre1

This is the output from that command:

Assembly ./projects/client/RabbitMQ.Client/bin/SignedRelease/net451/RabbitMQ.Client.dll signed.
+ dotnet pack ./projects/client/RabbitMQ.Client --no-build --configuration SignedRelease --version-suffix pre1
Microsoft (R) Build Engine version 16.2.32702+c4012a063 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

/root/.nuget/packages/nuget.build.tasks.pack/4.0.0/buildCrossTargeting/NuGet.Build.Tasks.Pack.targets(104,5): error MSB4018: The "PackTask" task failed unexpectedly. [/tmp/build/b7e18be8/rabbitmq_dotnet_client/projects/client/RabbitMQ.Client/RabbitMQ.Client.csproj]
/root/.nuget/packages/nuget.build.tasks.pack/4.0.0/buildCrossTargeting/NuGet.Build.Tasks.Pack.targets(104,5): error MSB4018: System.TypeLoadException: Could not load type 'NuGet.Commands.MSBuildStringUtility' from assembly 'NuGet.Commands, Version=5.2.0.3, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. [/tmp/build/b7e18be8/rabbitmq_dotnet_client/projects/client/RabbitMQ.Client/RabbitMQ.Client.csproj]
/root/.nuget/packages/nuget.build.tasks.pack/4.0.0/buildCrossTargeting/NuGet.Build.Tasks.Pack.targets(104,5): error MSB4018:    at NuGet.Build.Tasks.Pack.PackTask.GetRequest() [/tmp/build/b7e18be8/rabbitmq_dotnet_client/projects/client/RabbitMQ.Client/RabbitMQ.Client.csproj]
/root/.nuget/packages/nuget.build.tasks.pack/4.0.0/buildCrossTargeting/NuGet.Build.Tasks.Pack.targets(104,5): error MSB4018:    at NuGet.Build.Tasks.Pack.PackTask.Execute() [/tmp/build/b7e18be8/rabbitmq_dotnet_client/projects/client/RabbitMQ.Client/RabbitMQ.Client.csproj]
/root/.nuget/packages/nuget.build.tasks.pack/4.0.0/buildCrossTargeting/NuGet.Build.Tasks.Pack.targets(104,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [/tmp/build/b7e18be8/rabbitmq_dotnet_client/projects/client/RabbitMQ.Client/RabbitMQ.Client.csproj]
/root/.nuget/packages/nuget.build.tasks.pack/4.0.0/buildCrossTargeting/NuGet.Build.Tasks.Pack.targets(104,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) [/tmp/build/b7e18be8/rabbitmq_dotnet_client/projects/client/RabbitMQ.Client/RabbitMQ.Client.csproj]

This is the entire output:
5.x-pre-release-output.txt

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions