Sdk: dotnet build with compilationOptions.xmlDoc = true fails with CS2001 error

Created on 20 Apr 2016  路  11Comments  路  Source: dotnet/sdk

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

Bug

All 11 comments

@jmezach - I tried reproing this using the latest build, but I couldn't repro it. Is "dev" the right branch to use?

I am getting a Microsoft.DotNet.Watcher.Core.xml file generated under bin\Debug\netstandard1.5:

<?xml version="1.0"?>
<doc>
    <assembly>
        <name>Microsoft.DotNet.Watcher.Core</name>
    </assembly>
    <members>
    </members>
</doc>

Can you try it again using a newer build?

Just tried it with the newest build, but I'm still getting the same error:

F:\Projects\Open Source\dotnet-watch\src\Microsoft.DotNet.Watcher.Core>dotnet --info
.NET Command Line Tools (1.0.0-rc2-002520)

Product Information:
Version: 1.0.0-rc2-002520
Commit Sha: 7c504b2456

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

F:\Projects\Open Source\dotnet-watch\src\Microsoft.DotNet.Watcher.Core>dotnet build
Project Microsoft.DotNet.Watcher.Core (.NETStandard,Version=v1.5) will be compiled because expected outputs are missing
Compiling Microsoft.DotNet.Watcher.Core for .NETStandard,Version=v1.5
C:\Program Files\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.Corebin\Debug\netstandard1.5Microsoft.DotNet.Watcher.Core.xml' could not be found.

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

Time elapsed 00:00:00.7178620

@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 :smile:)

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. :smile:

I will get a fix for it today hopefully.

@eerhardt thanks! :clap:

My best guess is that this issue may be caused by the lack of quotes there: https://github.com/dotnet/cli/blob/rel/1.0.0/src/dotnet/commands/dotnet-compile-csc/Program.cs#L192.

@eerhardt did you send approval mail?

@eerhardt did you send approval mail?

yes

Thanks @PinpointTownes. You made my investigation really easy. :)

@eerhardt you're welcome. Thanks for fixing it :smile:

<GenerateDocumentationFile>true</GenerateDocumentationFile>

@eerhardt Thanks!

Was this page helpful?
0 / 5 - 0 ratings