[Ironruby-core] Duplicate definition of Action & other classes

Curt Hagenlocher curth at microsoft.com
Tue Jul 8 12:34:31 EDT 2008


There's going to be some merging of classes as parts of the DLR move into the next version of the CLR.  The alternative to the pain you're feeling would be for us to branch the DLR, which we're not ready to do yet.

-----Original Message-----
From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Robert Brotherus
Sent: Tuesday, July 08, 2008 9:04 AM
To: ironruby-core at rubyforge.org
Subject: [Ironruby-core] Duplicate definition of Action & other classes

In my ongoing switch from IR SVN 113 to IR SVN 121, another issue has
emerged.

It seems that multiple new classes have been added to
Microsoft.Scripting.Core.dll that have identical name with corresponding
classes in System.Core.dll (v. 3.5). Below is my code (that is
complicing and running ok against IR SVN 113) and the build errors
against IR SVN 121.

I can rather easily make a work-around for this case but still wondering
if it is possible to make the code work as it is now and why such
duplicate classes have been added?

Robert Brotherus
Software architect
Napa Ltd
Email: Robert.Brotherus at napa.fi
www.napa.fi

------------------------------------------------------------------

        public T ExecuteStr<T>(string code)
        {
            return
Engine.CreateScriptSourceFromString(code).Execute<T>(Engine.CreateScope(
));
        }

        public Action<string, string> RunTests // scriptDir, testMethod
<-- ERROR CS0433 HERE
        {
            get
            {
                ExecuteFile("Test/TestResults.rb");
                return ExecuteStr<Action<string,
string>>("TestRunner.method(:run)");
            }
        }

        ...

        ScriptService.SharedService.RunTests(ScriptService.ScriptDir,
app.ArgValue("test"));

        ...

------ Build started: Project: gui, Configuration: Debug Any CPU ------

warning CS1685: The predefined type 'System.Linq.Expressions.Expression'
is defined in multiple assemblies in the global alias; using definition
from 'c:\Program Files (x86)\Reference
Assemblies\Microsoft\Framework\v3.5\System.Core.dll'

warning CS1685: The predefined type 'System.Linq.Expressions.Expression'
is defined in multiple assemblies in the global alias; using definition
from 'c:\Program Files (x86)\Reference
Assemblies\Microsoft\Framework\v3.5\System.Core.dll'

...

warning CS1685: The predefined type
'System.Linq.Expressions.ElementInit' is defined in multiple assemblies
in the global alias; using definition from 'c:\Program Files
(x86)\Reference Assemblies\Microsoft\Framework\v3.5\System.Core.dll'

C:\work\napa.net\gui\ScriptService.cs(113,16): error CS0433: The type
'System.Action<T1,T2>' exists in both 'c:\Program Files (x86)\Reference
Assemblies\Microsoft\Framework\v3.5\System.Core.dll' and
'c:\programs\IronRuby\trunk\build\debug\svn121\Microsoft.Scripting.Core.
dll'

c:\Program Files (x86)\Reference
Assemblies\Microsoft\Framework\v3.5\System.Core.dll: (Related file)

c:\programs\IronRuby\trunk\build\debug\svn121\Microsoft.Scripting.Core.d
ll: (Related file)

Compile complete -- 1 errors, 21 warnings


_______________________________________________
Ironruby-core mailing list
Ironruby-core at rubyforge.org
http://rubyforge.org/mailman/listinfo/ironruby-core



More information about the Ironruby-core mailing list