project-system: filenames in compiler errors to not contain enough path information to disambiguate , confusing visual studio
@Spongman commented on Mon Jun 04 2018
when i build one of the dotnet core projects in my solution, i get the following error:
1>------ Rebuild All started: Project: MyProject, Configuration: Debug Any CPU ------
1>Program.cs(58,4,58,30): error CS0234: The type or namespace name 'ServicePointManager' does not exist in the namespace 'System' (are you missing an assembly reference?)
1>Done building project "MyProject.csproj" -- FAILED.
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
when i double-click on that error in the Visual Studio output window it opens the wrong Program.cs
file. this is no doubt due to the fact that the full solution-relative path to the file containing the error isn’t included.
when building with the desktop csc.exe the full (ie c:\-relative) path is displayed so there is no ambiguity.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 21 (11 by maintainers)
The compiler will ~always see CWD as the project directory, so that wouldn’t help. I’d lean toward “just always use the full path” but I agree that the existing longstanding behavior shouldn’t be changed on a whim. I also agree that VS should opt into full paths; it doesn’t have to display them but it should know them.