dotnet build doesn't correctly handle special chars in project paths
See original GitHub issueSteps to reproduce
Create a new folder containing accents/special chars (e.g I love special chars - éèàôöç
)
Run dotnet new
to initialize a new project.
Run dotnet restore
.
Run dotnet run
.
Expected behavior
Hello World!
Actual behavior
PS G:\I love special chars - éèàôöç> dotnet new
Created new C# project in G:\I love special chars - éèà ôöç.
PS G:\I love special chars - éèàôöç> dotnet restore
log : Restoring packages for G:\I love special chars - éèà ôöç\project.json...
info : Committing restore...
log : Writing lock file to disk. Path: G:\I love special chars - éèà ôöç\project.lock.json
log : G:\I love special chars - éèà ôöç\project.json
log : Restore completed in 1395ms.
NuGet Config files used:
G:\I love special chars - éèà ôöç\NuGet.Config
C:\Users\Chalet Kévin\AppData\Roaming\NuGet\NuGet.Config
Feeds used:
https://dotnet.myget.org/F/dotnet-core/api/v3/index.json
https://api.nuget.org/v3/index.json
PS G:\I love special chars - éèàôöç> dotnet run
Compiling I love special chars - éèà ôöç for .NETStandard,Version=v1.5
dotnet : Response file 'G:\I love special chars - éèàôöç\obj\Debug\netstandard1.5\dotnet-compile.rsp' doesn't exist.
At line:1 char:1
+ dotnet build
+ ~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (Response file '... doesn't exist.:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
C:\Program Files\dotnet\dotnet.exe compile-csc "@G:\I love special chars - éèà ôöç\obj\Debug\netstandard1.5\dotnet-compile.rsp" returned Exit Code 1
Compilation failed.
0 Warning(s)
0 Error(s)
Time elapsed 00:00:00.1348554
Environment data
dotnet --info
output:
.NET Command Line Tools (1.0.0-beta-002202)
Product Information: Version: 1.0.0-beta-002202 Commit Sha: 60b23d5115
Runtime Environment: OS Name: Windows OS Version: 6.1.7601 OS Platform: Windows RID: win7-x64
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Version 16.4.4 does not support special characters in ...
Create a C# Class Library project under path: C:\Users\v-zhajin\source\repos\ÅÖÄÂydy which contain the special character; Build the project
Read more >How to remove illegal characters from path and filenames?
The best way to remove illegal character from user input is to replace illegal character using Regex class, create method in code behind...
Read more >Path.Combine Method (System.IO)
This method is intended to concatenate individual strings into a single string that represents a file path. However, if an argument other than...
Read more >Path Class (System.IO)
Performs operations on String instances that contain file or directory path information. These operations are performed in a cross-platform manner.
Read more >NET SDK error list - .NET CLI
A complete list of NETSDKxxxx errors, with links to more info where more info is available.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
/cc @brthor @blackdwarf @Sridhar-MS
Closing, since https://github.com/dotnet/cli/issues/2486 is already triaged (even if this thread is older 😄).