Bug 53231 - csc doesn't unify same file passed multiple times when one path is relative
Summary: csc doesn't unify same file passed multiple times when one path is relative
Alias: None
Product: Class Libraries
Classification: Mono
Component: mscorlib (show other bugs)
Version: master
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Marek Safar
Depends on:
Reported: 2017-03-10 18:13 UTC by Alexander Köplinger [MSFT]
Modified: 2017-03-12 09:33 UTC (History)
2 users (show)

See Also:
Tags: 2017-02
Is this bug a regression?: ---
Last known good build:


Description Alexander Köplinger [MSFT] 2017-03-10 18:13:50 UTC

> public class A
> {
>     public static void Main(){}
> }

works (prints CS2002 warning):

> csc test.cs test.cs


> csc test.cs ../sourcefolder/test.cs
> test.cs(1,14): error CS0101: The namespace '<global namespace>' already contains a definition for 'A'

Tried with Mono master/d455c0d. Works with the csc included in .NET Core, so I assume it's our bug.
This turned up in the XA build today that Andi is trying to fix for 2017-02 (she'll deduplicate the files there for now).
Comment 1 Marek Safar 2017-03-12 09:33:01 UTC
Fixed in master and 2017-02 branch

Notice (2018-05-21): bugzilla.xamarin.com will be switching to read-only mode on Thursday, 2018-05-25 22:00 UTC.

Please join us on Visual Studio Developer Community and GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs and copy them to the new locations as needed for follow-up. The See Also field on each Bugzilla bug will be updated with a link to its new location when applicable.

After Bugzilla is read-only, if you have new information to add for a bug that does not yet have a matching issue on Developer Community or GitHub, you can create a follow-up issue in the new location. Copy and paste the title and description from this bug, and then add your new details. You can get a pre-formatted version of the title and description here:

In special cases you might also want the comments:

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.

Note You need to log in before you can comment on or make changes to this bug.