dotnet tool install failed when home directory has non ASCII character with MSBuild Error
See original GitHub issueSteps 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:
- Created 5 years ago
- Comments:24 (8 by maintainers)
Top GitHub Comments
@pherbel could you try this as a possible workaround?
You may then use
dotnet tool list -g
anddotnet tool uninstall -g dotnet-outdated
.Log more error case Pass
"ab ; semi . period , comma"
will error withError 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 witherror MSB1006: Property is not valid.Switch: semi . period For switch syntax, type “MSBuild /help”
comma kills it…