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

Robert Brotherus robert.brotherus at napa.fi
Tue Jul 8 12:04:19 EDT 2008


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




More information about the Ironruby-core mailing list