dotnet / dotnet/msbuild

dotnet build cannot support path with folder name has '%20'

Open
#2,178 13 comments 1 reaction 0 assignees View on GitHub
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 13h
Merged PRs (30d)
133

Description

_From @micli on June 5, 2017 6:24_

## Steps to reproduce

Recently I am trying to write a book to introduce .NET Core Debugging skill to audience. I created a project on Visual Studio Online with name "Dotnet core Debugging Book". It git clone to local, folder
is "Dotnet%20core%20Debugging%20Book".
In this folder, if I create a simple console .Net Core 2.0 app with below command, it will not build correctly.
`dotnet new console -o DumpMe
dotnet restore
dotnet build`

I got below error message when did dotnet build action:
`/usr/local/share/dotnet/sdk/2.0.0-preview1-005977/Sdks/Microsoft.NET.Sdk/build/Microsoft.PackageDependencyResolution.targets(155,5): error : Assets file '/Users/micl/Documents/DotnetDebugging/Dotnet core Debugging Book/code/Chapter04/DumpMe/obj/project.assets.json' not found. Run a NuGet package restore to generate this file. [/Users/micl/Documents/DotnetDebugging/Dotnet%20core%20Debugging%20Book/code/Chapter04/DumpMe/DumpMe.csproj]
obj/Debug/netcoreapp2.0/DumpMe.AssemblyInfo.cs(6,12): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?) [/Users/micl/Documents/DotnetDebugging/Dotnet%20core%20Debugging%20Book/code/Chapter04/DumpMe/DumpMe.csproj]
obj/Debug/netcoreapp2.0/DumpMe.AssemblyInfo.cs(7,12): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?) [/Users/micl/Documents/DotnetDebugging/Dotnet%20core%20Debugging%20Book/code/Chapter04/DumpMe/DumpMe.csproj]
obj/Debug/netcoreapp2.0/DumpMe.AssemblyInfo.cs(8,12): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?) [/Users/micl/Documents/DotnetDebugging/Dotnet%20core%20Debugging%20Book/code/Chapter04/DumpMe/DumpMe.csproj]
obj/Debug/netcoreapp2.0/DumpMe.AssemblyInfo.cs(9,12): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?) [/Users/micl/Documents/DotnetDebugging/Dotnet%20core%20Debugging%20Book/code/Chapter04/DumpMe/DumpMe.csproj]
obj/Debug/netcoreapp2.0/DumpMe.AssemblyInfo.cs(10,12): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?) [/Users/micl/Documents/DotnetDebugging/Dotnet%20core%20Debugging%20Book/code/Chapter04/DumpMe/DumpMe.csproj]
obj/Debug/netcoreapp2.0/DumpMe.AssemblyInfo.cs(11,12): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?) [/Users/micl/Documents/DotnetDebugging/Dotnet%20core%20Debugging%20Book/code/Chapter04/DumpMe/DumpMe.csproj]
obj/Debug/netcoreapp2.0/DumpMe.AssemblyInfo.cs(12,12): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?) [/Users/micl/Documents/DotnetDebugging/Dotnet%20core%20Debugging%20Book/code/Chapter04/DumpMe/DumpMe.csproj]
obj/Debug/netcoreapp2.0/DumpMe.AssemblyInfo.cs(13,12): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?) [/Users/micl/Documents/DotnetDebugging/Dotnet%20core%20Debugging%20Book/code/Chapter04/DumpMe/DumpMe.csproj]
obj/Debug/netcoreapp2.0/DumpMe.AssemblyInfo.cs(6,55): error CS0518: Predefined type 'System.String' is not defined or imported [/Users/micl/Documents/DotnetDebugging/Dotnet%20core%20Debugging%20Book/code/Chapter04/DumpMe/DumpMe.csproj]
obj/Debug/netcoreapp2.0/DumpMe.AssemblyInfo.cs(7,61): error CS0518: Predefined type 'System.String' is not defined or imported [/Users/micl/Documents/DotnetDebugging/Dotnet%20core%20Debugging%20Book/code/Chapter04/DumpMe/DumpMe.csproj]
obj/Debug/netcoreapp2.0/DumpMe.AssemblyInfo.cs(8,59): error CS0518: Predefined type 'System.String' is not defined or imported [/Users/micl/Documents/DotnetDebugging/Dotnet%20core%20Debugging%20Book/code/Chapter04/DumpMe/DumpMe.csproj]
obj/Debug/netcoreapp2.0/DumpMe.AssemblyInfo.cs(9,59): error CS0518: Predefined type 'System.String' is not defined or imported [/Users/micl/Documents/DotnetDebugging/Dotnet%20core%20Debugging%20Book/code/Chapter04/DumpMe/DumpMe.csproj]
obj/Debug/netcoreapp2.0/DumpMe.AssemblyInfo.cs(10,68): error CS0518: Predefined type 'System.String' is not defined or imported [/Users/micl/Documents/DotnetDebugging/Dotnet%20core%20Debugging%20Book/code/Chapter04/DumpMe/DumpMe.csproj]
obj/Debug/netcoreapp2.0/DumpMe.AssemblyInfo.cs(11,55): error CS0518: Predefined type 'System.String' is not defined or imported [/Users/micl/Documents/DotnetDebugging/Dotnet%20core%20Debugging%20Book/code/Chapter04/DumpMe/DumpMe.csproj]
obj/Debug/netcoreapp2.0/DumpMe.AssemblyInfo.cs(12,53): error CS0518: Predefined type 'System.String' is not defined or imported [/Users/micl/Documents/DotnetDebugging/Dotnet%20core%20Debugging%20Book/code/Chapter04/DumpMe/DumpMe.csproj]
obj/Debug/netcoreapp2.0/DumpMe.AssemblyInfo.cs(13,55): error CS0518: Predefined type 'System.String' is not defined or imported [/Users/micl/Documents/DotnetDebugging/Dotnet%20core%20Debugging%20Book/code/Chapter04/DumpMe/DumpMe.csproj]
obj/Debug/netcoreapp2.0/DumpMe.AssemblyInfo.cs(3,7): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?) [/Users/micl/Documents/DotnetDebugging/Dotnet%20core%20Debugging%20Book/code/Chapter04/DumpMe/DumpMe.csproj]
obj/Debug/netcoreapp2.0/DumpMe.AssemblyInfo.cs(4,7): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?) [/Users/micl/Documents/DotnetDebugging/Dotnet%20core%20Debugging%20Book/code/Chapter04/DumpMe/DumpMe.csproj]
/usr/local/share/dotnet/sdk/2.0.0-preview1-005977/Sdks/Microsoft.NET.Sdk/build/Microsoft.NET.Sdk.targets(94,5): error : Assets file '/Users/micl/Documents/DotnetDebugging/Dotnet core Debugging Book/code/Chapter04/DumpMe/obj/project.assets.json' not found. Run a NuGet package restore to generate this file. [/Users/micl/Documents/DotnetDebugging/Dotnet%20core%20Debugging%20Book/code/Chapter04/DumpMe/DumpMe.csproj]

Build FAILED.

/usr/local/share/dotnet/sdk/2.0.0-preview1-005977/Sdks/Microsoft.NET.Sdk/build/Microsoft.PackageDependencyResolution.targets(155,5): error : Assets file '/Users/micl/Documents/DotnetDebugging/Dotnet core Debugging Book/code/Chapter04/DumpMe/obj/project.assets.json' not found. Run a NuGet package restore to generate this file. [/Users/micl/Documents/DotnetDebugging/Dotnet%20core%20Debugging%20Book/code/Chapter04/DumpMe/DumpMe.csproj]
obj/Debug/netcoreapp2.0/DumpMe.AssemblyInfo.cs(6,12): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?) [/Users/micl/Documents/DotnetDebugging/Dotnet%20core%20Debugging%20Book/code/Chapter04/DumpMe/DumpMe.csproj]
obj/Debug/netcoreapp2.0/DumpMe.AssemblyInfo.cs(7,12): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?) [/Users/micl/Documents/DotnetDebugging/Dotnet%20core%20Debugging%20Book/code/Chapter04/DumpMe/DumpMe.csproj]
obj/Debug/netcoreapp2.0/DumpMe.AssemblyInfo.cs(8,12): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?) [/Users/micl/Documents/DotnetDebugging/Dotnet%20core%20Debugging%20Book/code/Chapter04/DumpMe/DumpMe.csproj]
obj/Debug/netcoreapp2.0/DumpMe.AssemblyInfo.cs(9,12): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?) [/Users/micl/Documents/DotnetDebugging/Dotnet%20core%20Debugging%20Book/code/Chapter04/DumpMe/DumpMe.csproj]
obj/Debug/netcoreapp2.0/DumpMe.AssemblyInfo.cs(10,12): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?) [/Users/micl/Documents/DotnetDebugging/Dotnet%20core%20Debugging%20Book/code/Chapter04/DumpMe/DumpMe.csproj]
obj/Debug/netcoreapp2.0/DumpMe.AssemblyInfo.cs(11,12): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?) [/Users/micl/Documents/DotnetDebugging/Dotnet%20core%20Debugging%20Book/code/Chapter04/DumpMe/DumpMe.csproj]
obj/Debug/netcoreapp2.0/DumpMe.AssemblyInfo.cs(12,12): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?) [/Users/micl/Documents/DotnetDebugging/Dotnet%20core%20Debugging%20Book/code/Chapter04/DumpMe/DumpMe.csproj]
obj/Debug/netcoreapp2.0/DumpMe.AssemblyInfo.cs(13,12): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?) [/Users/micl/Documents/DotnetDebugging/Dotnet%20core%20Debugging%20Book/code/Chapter04/DumpMe/DumpMe.csproj]
obj/Debug/netcoreapp2.0/DumpMe.AssemblyInfo.cs(6,55): error CS0518: Predefined type 'System.String' is not defined or imported [/Users/micl/Documents/DotnetDebugging/Dotnet%20core%20Debugging%20Book/code/Chapter04/DumpMe/DumpMe.csproj]
obj/Debug/netcoreapp2.0/DumpMe.AssemblyInfo.cs(7,61): error CS0518: Predefined type 'System.String' is not defined or imported [/Users/micl/Documents/DotnetDebugging/Dotnet%20core%20Debugging%20Book/code/Chapter04/DumpMe/DumpMe.csproj]
obj/Debug/netcoreapp2.0/DumpMe.AssemblyInfo.cs(8,59): error CS0518: Predefined type 'System.String' is not defined or imported [/Users/micl/Documents/DotnetDebugging/Dotnet%20core%20Debugging%20Book/code/Chapter04/DumpMe/DumpMe.csproj]
obj/Debug/netcoreapp2.0/DumpMe.AssemblyInfo.cs(9,59): error CS0518: Predefined type 'System.String' is not defined or imported [/Users/micl/Documents/DotnetDebugging/Dotnet%20core%20Debugging%20Book/code/Chapter04/DumpMe/DumpMe.csproj]
obj/Debug/netcoreapp2.0/DumpMe.AssemblyInfo.cs(10,68): error CS0518: Predefined type 'System.String' is not defined or imported [/Users/micl/Documents/DotnetDebugging/Dotnet%20core%20Debugging%20Book/code/Chapter04/DumpMe/DumpMe.csproj]
obj/Debug/netcoreapp2.0/DumpMe.AssemblyInfo.cs(11,55): error CS0518: Predefined type 'System.String' is not defined or imported [/Users/micl/Documents/DotnetDebugging/Dotnet%20core%20Debugging%20Book/code/Chapter04/DumpMe/DumpMe.csproj]
obj/Debug/netcoreapp2.0/DumpMe.AssemblyInfo.cs(12,53): error CS0518: Predefined type 'System.String' is not defined or imported [/Users/micl/Documents/DotnetDebugging/Dotnet%20core%20Debugging%20Book/code/Chapter04/DumpMe/DumpMe.csproj]
obj/Debug/netcoreapp2.0/DumpMe.AssemblyInfo.cs(13,55): error CS0518: Predefined type 'System.String' is not defined or imported [/Users/micl/Documents/DotnetDebugging/Dotnet%20core%20Debugging%20Book/code/Chapter04/DumpMe/DumpMe.csproj]
obj/Debug/netcoreapp2.0/DumpMe.AssemblyInfo.cs(3,7): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?) [/Users/micl/Documents/DotnetDebugging/Dotnet%20core%20Debugging%20Book/code/Chapter04/DumpMe/DumpMe.csproj]
obj/Debug/netcoreapp2.0/DumpMe.AssemblyInfo.cs(4,7): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?) [/Users/micl/Documents/DotnetDebugging/Dotnet%20core%20Debugging%20Book/code/Chapter04/DumpMe/DumpMe.csproj]
/usr/local/share/dotnet/sdk/2.0.0-preview1-005977/Sdks/Microsoft.NET.Sdk/build/Microsoft.NET.Sdk.targets(94,5): error : Assets file '/Users/micl/Documents/DotnetDebugging/Dotnet core Debugging Book/code/Chapter04/DumpMe/obj/project.assets.json' not found. Run a NuGet package restore to generate this file. [/Users/micl/Documents/DotnetDebugging/Dotnet%20core%20Debugging%20Book/code/Chapter04/DumpMe/DumpMe.csproj]
0 Warning(s)
20 Error(s)
`
But if I do above under a folder without '%20', It actions as usual.

## Expected behavior
To confirm the folder name with '%20' supports or not. It seems that general actions like copy, paste doing well under the folder which name has '%20'.

## Actual behavior

## Environment data
`dotnet --info` output:
.NET Command Line Tools (2.0.0-preview1-005977)

Product Information:
Version: 2.0.0-preview1-005977
Commit SHA-1 hash: 414cab8a0b

Runtime Environment:
OS Name: Mac OS X
OS Version: 10.12
OS Platform: Darwin
RID: osx.10.12-x64
Base Path: /usr/local/share/dotnet/sdk/2.0.0-preview1-005977/

Microsoft .NET Core Shared Framework Host

Version : 2.0.0-preview1-002111-00
Build : 1ff021936263d492539399688f46fd3827169983

_Copied from original issue: dotnet/cli#6761_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.