Skip to content

Unhandled exception: Settings file 'DotnetToolSettings.xml' was not found in the package. #53101

@rolfbjarne

Description

@rolfbjarne

Repro:

#!/bin/bash -eux

FILE=dotnet-sdk-10.0.300-preview.26118.105-osx-arm64.tar.gz
if ! test -f $FILE; then
	curl -LO https://ci.dot.net/public/Sdk/10.0.300-preview.26118.105/$FILE
fi

rm -rf dotnet
mkdir -p dotnet
tar -xf $FILE -C dotnet

rm -rf .config
mkdir -p .config
cat > .config/dotnet-tools.json <<EOF
{
  "version": 1,
  "isRoot": true,
  "tools": {
    "dotnet-t4": {
      "version": "2.2.1",
      "commands": [
        "t4"
      ],
      "rollForward": false
    }
  }
}
EOF
./dotnet/dotnet tool restore

Results in:

$ ./repro.sh
+ FILE=dotnet-sdk-10.0.300-preview.26118.105-osx-arm64.tar.gz
+ test -f dotnet-sdk-10.0.300-preview.26118.105-osx-arm64.tar.gz
+ rm -rf dotnet
+ mkdir -p dotnet
+ tar -xf dotnet-sdk-10.0.300-preview.26118.105-osx-arm64.tar.gz -C dotnet
+ rm -rf .config
+ mkdir -p .config
+ cat
+ ./dotnet/dotnet tool restore
Unhandled exception: Settings file 'DotnetToolSettings.xml' was not found in the package.

This is a regression, it started happening in this maestro pull request: dotnet/macios#24751

which did:

-<Dependency Name="Microsoft.NET.Sdk" Version="10.0.200-preview.0.26113.113">
+<Dependency Name="Microsoft.NET.Sdk" Version="10.0.300-preview.26118.105">

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions