Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
GitHub or Developer Community with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
mcs does not handle relative #line filenames, csc does
For example in the following project layout:
Both the following directives in the file Bar.cs work fine in csc and are resolved to correct absolute paths in the build output and the debug symbols:
#line 1 "B.cs"
#line 1 "../A.cs"
However, mcs outputs them verbatim and thus they do not work correctly.
By "build output" I mean file/line info in build errors.
VS somehow screws this up, probably the in-process compiler - it ends up with two near-identical versions of each error, one with the verbatim paths and one with the correct path. But csc and msbuild work fine.
I would like this to be able to generate razor / t4 output that does not contain machine/user-specific paths, since they output files are always checked into source control.
Okay, looks like mcs generates correct debug info but incorrect build output.
Do you need this for error/warning messages? There is command line option /fullpaths which does it.
I guess I would work around it with /fullpaths, but it's still an issue of compat. csc works fine without the option, mcs does not.
I don't see any reason why pollute error message with full source path. If you need it just use the option for it.
I'm not asking for the full path. I'm asking for the CORRECT relative path.
If I have a file Foo/Bar.cs, errors are reported in Foo/Bar.cs. If it includes #line 1 "Baz.t4", mcs reports errors in Baz.t4 (which is useless), csc reports errors in Foo/Baz.t4 (which is useful).
Fixed in master