question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

'dotnet tool restore' for maui repo fails on macOS

See original GitHub issue

Description

Following the MAUI Development Guide, I get the folling output for the dotnet tool restore step:

dotnet tool restore /var/folders/2_/b4md0kx56ss9ffwn_qf17c5w0000gn/T/q5juhwll.f0x/restore.csproj : error NU1101: Unable to find package microsoft.dotnet.xharness.cli. No packages exist with this id in source(s): /usr/local/share/dotnet/library-packs, nuget.org

Package “microsoft.dotnet.xharness.cli” failed to restore, due to Microsoft.DotNet.ToolPackage.ToolPackageException: The tool package could not be restored. at Microsoft.DotNet.Tools.Tool.Install.ProjectRestorer.Restore(FilePath project, PackageLocation packageLocation, String verbosity) at Microsoft.DotNet.ToolPackage.ToolPackageInstaller.InstallPackageToExternalManagedLocation(PackageLocation packageLocation, PackageId packageId, VersionRange versionRange, String targetFramework, String verbosity) at Microsoft.DotNet.Tools.Tool.Restore.ToolRestoreCommand.InstallPackages(ToolManifestPackage package, Nullable`1 configFile)

Tool ‘cake.tool’ (version ‘1.2.0’) was restored. Available commands: dotnet-cake Tool ‘powershell’ (version ‘7.2.1’) was restored. Available commands: pwsh Tool ‘api-tools’ (version ‘1.3.3’) was restored. Available commands: api-tools

Restore partially failed.

Steps to Reproduce

  1. Install :NET 6 SDK, Powershell, XCode
  2. cd $(MAUI_REPO)
  3. dotnet tool restore

Link to public reproduction project repository

https://github.com/dotnet/maui

Version with bug

6.0.400

Last version that worked well

Unknown/Other

Affected platforms

macOS

Affected platform versions

MacOS Monterey

Did you find any workaround?

No

Relevant log output

See description

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
jfversluiscommented, Oct 3, 2022

@xleon thanks! I doubt that would work though… Are we talking about the same thing?

@ChristophSchmidpeter looking at the output it doesn’t seem to pick up on the NuGet feed sources in the nuget.config file. Could you see why maybe that is? And/or add --source {url} (you can do this multiple times for multiple sources) for each of the sources in the nuget.config file manually and see if that helps?

0reactions
msftbot[bot]commented, Dec 5, 2022

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshoot known issues - .NET MAUI
This article describes some of the known issues with .NET Multi-platform App UI (.NET MAUI), and how you can solve or work around...
Read more >
Cannot debug net6.0-macos Apps - Developer Community
When I hit debug, the following error is shown in the Terminal: Possible reasons for this include: * You misspelled a built-in dotnet...
Read more >
Assets file project.assets.json not found. Run a NuGet ...
The error occurs because the dotnet cli does not create the all of the required files initially. Doing dotnet restore adds the required...
Read more >
MAUI on Mac - Visual Studio 2022 17.4.2 : r/VisualStudio
Hi all, I've been working on a MAUI project on my windows machine for a while now. I would like to move this...
Read more >
Getting started with Microsoft .NET MAUI
NET MAUI is a cross-platform framework for creating native mobile and desktop apps with C# and XAML. It works as an abstraction layer...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found