Thanks to visit codestin.com
Credit goes to github.com

Skip to content

dotnet tool install fails on Ubuntu with prerelease versions that contain a + character #24623

Open
@kkostrzewa-coupa

Description

@kkostrzewa-coupa

I have created a dotnet tool in .NET 6.0. My company's prerelease versioning includes a + character, for example 22.88.2-feature-SCAR-1663-isolated-work-and-tool+91feb52

Installation on Windows via dotnet tool install --global >TOOLNAME< --version 22.88.2-feature-SCAR-1663-isolated-work-and-tool+91feb52 succeeds.

Installation on Linux (WSL2 Ubuntu) fails with

The settings file in the tool's NuGet package is invalid: Failed to retrieve tool configuration: Could not find a part of the path '/home/kpk/.dotnet/tools/.store/>TOOLNAME</22.88.2-feature-scar-1663-isolated-work-and-tool/>TOOLNAME</22.88.2-feature-SCAR-1663-isolated-work-and-tool/tools/net6.0/any/DotnetToolSettings.xml'.
Tool '>TOOLNAME<' failed to install. Contact the tool author for assistance.

To Reproduce

  • dotnet new console --name tulle
  • code . and add <PackAsTool>true</PackAsTool> to tulle.csproj's <PropertyGroup>
  • dotnet pack --version-suffix "BadVersion+deadbeef" tulle/
  • dotnet tool install --global tulle --add-source tulle/bin/Debug/ --version "1.0.0-BadVersion+deadbeef"

these steps will fail on Linux (bash) with a

The settings file in the tool's NuGet package is invalid: Failed to retrieve tool configuration: Could not find a part of the path '/home/kpk/.dotnet/tools/.store/tulle/1.0.0-badversion/tulle/1.0.0-BadVersion/tools/net6.0/any/DotnetToolSettings.xml'.
Tool 'tulle' failed to install. Contact the tool author for assistance.

but succeed on Windows (powershell)

Exceptions (if any)

None

Further technical details

This may related to #16462. That felt a little similar

  • Include the output of dotnet --info

kpk@AMER-W-5927:~/d/tool-fail$ dotnet --info
.NET SDK (reflecting any global.json):
Version: 6.0.201
Commit: ef40e6a

Runtime Environment:
OS Name: ubuntu
OS Version: 20.04
OS Platform: Linux
RID: ubuntu.20.04-x64
Base Path: /usr/share/dotnet/sdk/6.0.201/

Host (useful for support):
Version: 6.0.3
Commit: c24d9a9c91

.NET SDKs installed:
5.0.406 [/usr/share/dotnet/sdk]
6.0.201 [/usr/share/dotnet/sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 5.0.15 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.3 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 5.0.15 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.1 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.3 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET runtimes or SDKs:
https://aka.ms/dotnet-download

  • The IDE (VS / VS Code/ VS4Mac) you're running on, and its version
    VS code (1.65.2)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions