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 build with compilationOptions.xmlDoc = true fails with CS2001 error

See original GitHub issue

Steps to reproduce

git clone https://github.com/aspnet/dotnet-watch git branch dev cd src\Microsoft.DotNet.Watcher.Core dotnet restore dotnet build

Expected behavior

Compiling Microsoft.DotNet.Watcher.Core for .NETStandard,Version=v1.5

Compilation succeeded. 0 Warning(s) 0 Error(s)

Time elapsed 00:00:02.7261664

Actual behavior

Compiling Microsoft.DotNet.Watcher.Core for .NETStandard,Version=v1.5 C:\Program Files (x86)\dotnet\dotnet.exe compile-csc @F:\Projects\Open Source\dotnet-watch\src\Microsoft.DotNet.Watcher.Core\obj\Debug\netstandard1.5\dotnet-compile.rsp returned Exit Code 1 F:\Projects\Open Source\dotnet-watch\src\Microsoft.DotNet.Watcher.Core\error CS2001: Source file ‘F:\Projects\Open Source\dotnet-watch\src\Microsoft.DotNet.Watcher.Core\Source\dotnet-watch\src\Microsoft.DotNet.Watcher.Core\bin\Debug\netstandard1.5\Microsoft.DotNet.Watcher.Core.xml’ could not be found.

Compilation failed. 0 Warning(s) 1 Error(s)

Time elapsed 00:00:00.7415870

Environment data

dotnet --info output: .NET Command Line Tools (1.0.0-rc2-002439)

Product Information: Version: 1.0.0-rc2-002439 Commit Sha: ef0c3b2cee

Runtime Environment: OS Name: Windows OS Version: 10.0.14316 OS Platform: Windows RID: win10-x64

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
eerhardtcommented, Apr 27, 2016

Thanks @jmezach and @PinpointTownes. The space in the path does appear to be the problem. It’s good to know how to repro the issue. Makes my job a lot easier. 😄

I will get a fix for it today hopefully.

1reaction
kevinchaletcommented, Apr 27, 2016

@eerhardt FYI, I’m also seeing this bug, which only reproduces when there’s a space in the project path (maybe caused by a few missing quotes somewhere?).

Compiling AspNet.Security.OpenIdConnect.Extensions for .NETStandard,Version=v1.4

C:\Program Files\dotnet\dotnet.exe compile-csc @G:\space in path\AspNet.Security.OpenIdConnect.Server\src\AspNet.Security.OpenIdConnect.Extensions\obj\Debug\netstandard1.4\dotnet-compile.rsp returned Exit Code 1

G:\space in path\AspNet.Security.OpenIdConnect.Server\src\AspNet.Security.OpenIdConnect.Extensions\error CS2001: Source file 'G:\space in path\AspNet.Security.OpenIdConnect.Server\src\AspNet.Security.OpenIdConnect.Extensions\path\AspNet.Security.OpenIdConnect.Server\src\AspNet.Security.OpenIdConnect.Extensions\bin\Debug\netstandard1.4\AspNet.Security.OpenIdConnect.Extensions.xml' could not be found.

G:\space in path\AspNet.Security.OpenIdConnect.Server\src\AspNet.Security.OpenIdConnect.Extensions\error CS2001: Source file 'G:\space in path\AspNet.Security.OpenIdConnect.Server\src\AspNet.Security.OpenIdConnect.Extensions\in' could not be found.

Compilation failed.
    0 Warning(s)
    2 Error(s)

You can see that the path used (and returned) by dotnet build is totally wrong:

G:\space in path\AspNet.Security.OpenIdConnect.Server\src\AspNet.Security.OpenIdConnect.Extensions\path\AspNet.Security.OpenIdConnect.Server\src\AspNet.Security.OpenIdConnect.Extensions\bin\Debug\netstandard1.4\AspNet.Security.OpenIdConnect.Extensions.xml

While it should be:

G:\space in path\AspNet.Security.OpenIdConnect.Server\src\AspNet.Security.OpenIdConnect.Extensions\bin\Debug\netstandard1.4\AspNet.Security.OpenIdConnect.Extensions.xml

(on a totally unrelated note, thank you very much for the unicode bug fix 😄)

Read more comments on GitHub >

github_iconTop Results From Across the Web

MSBuild error "CSC : error CS2001: Source File 'x' could ...
I inherited this issue from a project somebody else was working on, in my case was a .cs file supposed to be generated...
Read more >
Build intermittently fails due to missing generated source files
I happened to capture a failure under a build log. Actual behavior: CSC : error CS2001: Source file 'C:\project-system\artifacts\Debug\obj\ ...
Read more >
Console: Error CS2001: Source file 'myfile.cs' could not be ...
Hello, Unity is looking for a file called 'myfile.cs' which I deleted months ago. I've compiled over and over since then.
Read more >
[Mono-patches] [mono/mono] [660 commits] 3fb44e93
This isn't a problem for the runtime since GTD[] will never happen as it's an unrealizable type. Fixes #663815 Changed paths: M mono/metadata/verify.c ......
Read more >
Problems Building Ranorex with Jenkins
Hello, The error message 'CSC : error CS2001: Source file 'Recording1.cs' could not be found' shows that there are missing source code files....
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