# System.Action name collision

**URL:** <https://www.ruby-forum.com/t/system-action-name-collision/134305>\
**Category:** IronRuby\
**Created:** [April 9, 2008, 6:13pm UTC](https://www.ruby-forum.com/t/system-action-name-collision/134305 "2008-04-09T18:13:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sanghyeon\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e56c9b/32.png) [@Sanghyeon\_S](https://www.ruby-forum.com/u/Sanghyeon_S)\
**Post date:** [April 9, 2008, 6:13pm UTC](https://www.ruby-forum.com/t/system-action-name-collision/134305/1 "2008-04-09T18:13:29Z")

</div>

Cross-posting to mono-dev and ironruby-core.

System.Action delegate types (and its generic versions) were newly  
introduced in .NET 3.5, and they live inside System.Core.dll.

Dynamic Language Runtime wants to run on .NET 2.0, so it has its own  
version of these simple classes as Microsoft.Scripting.Utils.Action  
(and its generic versions).

Now Mono 1.9’s C# compiler defaults to C# 3.0 mode, and to quote, “the  
System.Core.dll assembly is now referenced and this might cause some  
type ambiguities, in particular with the “Action” type (System.Action  
from System.Core vs Gtk.Action for example). The fix is to either use  
fully qualified names for Gtk.Action, or to use namespace aliases.”  
(See Mono release note.)

Many IronRuby source files do both “using System” and “using  
Microsoft.Scripting.Utils”, and name collision happens. Now Gtk.Action  
is annoying, but using fully qualified  
Microsoft.Scripting.Utils.Action is horrifying.

Using “using alias directive” won’t work with generics. C# Language  
Specification ECMA-334 25.5.7 specifically disallows this. This is  
logged as Microsoft Connect Feedback 93520 which is closed as  
“postponed” since 2004.

> **[Home of stone](https://www.bing.com?ref=aka&shorturl=connect-redirect)**
>
> Ancient and beautiful, Rock House is the only true

I can live with substituting all occurences of Action class, but I  
wonder if any of you have better idea.

---

<div class="post-metadata">

**Author:** ![Sanghyeon\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e56c9b/32.png) [@Sanghyeon\_S](https://www.ruby-forum.com/u/Sanghyeon_S)\
**Post date:** [April 9, 2008, 7:11pm UTC](https://www.ruby-forum.com/t/system-action-name-collision/134305/2 "2008-04-09T19:11:49Z")

</div>

Hey,

On 4/9/08, Sanghyeon S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Now Mono 1.9’s C# compiler defaults to C# 3.0 mode, and to quote, “the  
> System.Core.dll assembly is now referenced and this might cause some  
> type ambiguities, in particular with the “Action” type (System.Action  
> from System.Core vs Gtk.Action for example). The fix is to either use  
> fully qualified names for Gtk.Action, or to use namespace aliases.”  
> (See Mono release note.)

It’s worth noting that it’s not just a Mono issue. You’ll have the  
exact same issue as soon as you’ll compile on csc 3.5, as discussed in  
a previous thread.
