vscode-csharp: Errors in output window do not get source links
Environment data
dotnet --info
output:
.NET Command Line Tools (1.0.0-rc4-004769)
Product Information:
Version: 1.0.0-rc4-004769
Commit SHA-1 hash: 9cf4e9d1d0
Runtime Environment:
OS Name: Windows
OS Version: 10.0.14393
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\1.0.0-rc4-004769
VS Code version: 1.9.0 C# Extension version: 1.6.2
Steps to reproduce
- dotnet new console
- dotnet restore
- Edit program.cs and make a deliberate error
- code .
- Ctrl+Shift+B
- Configure build task -> .NET Core
- Ctrl+Shift+B again
- Look at output window
Expected behavior
I can click on each of the errors in the output window and go to the relevant source.
Actual behavior
I can’t click on the errors because they have project-relative paths.
Workaround
Set <GenerateFullPaths>true</GenerateFullPaths>
in csproj.
Notes
Visual Studio arranges to have full paths in its output window, but VS code does not.
Related: dotnet/sdk#823
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 13
- Comments: 39 (11 by maintainers)
Commits related to this issue
- enable hotlink to file from problems tab in vscode https://github.com/OmniSharp/omnisharp-vscode/issues/1197 — committed to bellrichm/weather by bellrichm 6 years ago
@rchande Yes! That fixed it, thank you. For any future readers flailing around the setting referred to in the first post needs to go into a
<PropertyGroup>
Thanks @nguerrera and all for the thoughtful discussion. We’ll do our best to prioritize this.
For those of us who are not proficient with
.csproj
files, this means adding<GenerateFullPaths>true</GenerateFullPaths>
in the the top-most<PropertyGroup>
element.@rchande: The right fix is to update the tasks.json generation to include
/p:GenerateFullPaths=true
.Gotta imagine too the amount of users who don’t take the time to report feedback. They just use something else.