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 install failed when home directory has non ASCII character with MSBuild Error

See original GitHub issue

Steps to reproduce

dotnet tool install --global dotnet-outdated Or dotnet tool install --global dotnet-outdated --version 1.0.0

Expected behavior

dotnet tool is installed successfully

Actual behavior

MSBUILD : error MSB1006: Property is not valid.

The tool package could not be restored. Tool ‘dotnet-outdated’ failed to install. This failure may have been caused by:

  • You are attempting to install a preview release and did not use the --version option to specify the version.
  • A package by this name was found, but it was not a .NET Core tool.
  • The required NuGet feed cannot be accessed, perhaps because of an Internet connection problem.
  • You mistyped the name of the tool.

Environment data

dotnet --info output:

.NET Core SDK (reflecting any global.json): Version: 2.1.300 Commit: adab45bf0c

Runtime Environment: OS Name: Windows OS Version: 10.0.17134 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\2.1.300\

Host (useful for support): Version: 2.1.0 Commit: caa7b7e2ba

.NET Core SDKs installed: 2.1.4 [C:\Program Files\dotnet\sdk] 2.1.100 [C:\Program Files\dotnet\sdk] 2.1.102 [C:\Program Files\dotnet\sdk] 2.1.103 [C:\Program Files\dotnet\sdk] 2.1.104 [C:\Program Files\dotnet\sdk] 2.1.200 [C:\Program Files\dotnet\sdk] 2.1.201 [C:\Program Files\dotnet\sdk] 2.1.300 [C:\Program Files\dotnet\sdk]

.NET Core runtimes installed: Microsoft.AspNetCore.All 2.1.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.1.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 2.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.0.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.0.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.1.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

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

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:24 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
peterhuenecommented, Jun 5, 2018

@pherbel could you try this as a possible workaround?

> mkdir C:\ToolsTemp
> dotnet tool install dotnet-outdated --tool-path C:\ToolsTemp
> xcopy C:\ToolsTemp C:\Users\PéterHerbel\.dotnet\tools /E
> rmdir /s C:\ToolsTemp

You may then use dotnet tool list -g and dotnet tool uninstall -g dotnet-outdated.

0reactions
wli3commented, Jun 12, 2018

Log more error case Pass "ab ; semi . period , comma" will error with

Error Message: Microsoft.DotNet.ToolPackage.ToolPackageException : The tool package could not be restored.c:\work\cli\bin\2\win-x64\dotnet\sdk\2.1.301-preview-008906\15.0\Microsoft.Common.props(61,35): error MSB4115: The “HasTrailingSlash” function only accepts a scalar value, but its argument “$(MSBuildProjectExtensionsPath)” evaluates to “c:\work\cli\bin\2\win-x64\test\artifacts\ab ; semi . period , comma\f2oiwymg.yel.stage\ctxxm3e0.fia” which is not a scalar value. [C:\Users\wul\AppData\Local\Temp\pkogc221.jgz\giwtguht.0ng.csproj]

; is not escaped

Pass \"ab ; semi . period , comma\" will error with

error MSB1006: Property is not valid.Switch: semi . period For switch syntax, type “MSBuild /help”

comma kills it…

Read more comments on GitHub >

github_iconTop Results From Across the Web

dotnet tool install failed when home directory has non ...
Tool 'dotnet-outdated' failed to install. This failure may have been caused by: * You are attempting to install a preview release and did...
Read more >
MSBuild fails for .NET Core SDK Version 2.2.202
After downloading and installing Visual Studio 2019 RC, I cannot run msbuild, and get the following error: "Version 2.2.202 of the .NET Core...
Read more >
Troubleshoot Office solution deployment - Visual Studio
Installation fails when the URI has characters that aren't US-ASCII. When you publish an Office solution to an HTTP/HTTPS/FTP location, the path ......
Read more >
MSBuild Command-Line Reference
Learn how to use MSBuild.exe command line to build a project or solution file, and several switches you can include.
Read more >
Visual Studio 2019 version 16.9 Release Notes
Get the latest features, bug fixes, and support for Visual Studio 2019 ... path contains one or more non-ASCII characters has been fixed....
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