Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install fails on .NET 9 #33

Open
MeikelLP opened this issue Jan 2, 2025 · 1 comment
Open

Install fails on .NET 9 #33

MeikelLP opened this issue Jan 2, 2025 · 1 comment

Comments

@MeikelLP
Copy link

MeikelLP commented Jan 2, 2025

The command dotnet tool restore fails in our pipeline.
dotnet-tools.json:

{
  "version": 1,
  "isRoot": true,
  "tools": {
    "generateaspnetcoreclient.refit": {
      "version": "3.0.0",
      "commands": [
        "dotnet-generate-client"
      ],
      "rollForward": false
    }
  }
}
Unhandled exception: Microsoft.DotNet.ToolPackage.ToolConfigurationException: Settings file 'DotnetToolSettings.xml' was not found in the package.
   at Microsoft.DotNet.ToolPackage.ToolPackageInstance.DeserializeToolConfiguration(LockFileTargetLibrary library)
   at Microsoft.DotNet.ToolPackage.ToolPackageInstance.GetToolConfiguration()
   at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
   at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
   at System.Lazy`1.CreateValue()
   at Microsoft.DotNet.ToolPackage.ToolPackageInstance.GetCommands()
   at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
   at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
   at System.Lazy`1.CreateValue()
   at Microsoft.DotNet.Tools.Tool.Restore.ToolRestoreCommand.InstallPackages(ToolManifestPackage package, Nullable`1 configFile)
   at System.Linq.Enumerable.SelectArrayIterator`2.Fill(ReadOnlySpan`1 source, Span`1 destination, Func`2 func)
   at System.Linq.Enumerable.SelectArrayIterator`2.ToArray()
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at Microsoft.DotNet.Tools.Tool.Restore.ToolRestoreCommand.Execute()
   at System.CommandLine.Invocation.InvocationPipeline.Invoke(ParseResult parseResult)
   at Microsoft.DotNet.Cli.Program.ProcessArgs(String[] args, TimeSpan startupTime, ITelemetry telemetryClient)

I found a similar issue: chucknorris/roundhouse#421

Thus I think this is the package's fault and not something I can fix myself. From what I can see you just need to add an "empty" DotnetToolSettings.xml

@MeikelLP
Copy link
Author

MeikelLP commented Jan 2, 2025

Additional note:

This issue happened when installing the tool with net8 SDK which is not supported I know but the message is still confusing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant