[IronPython] IronPython 2 Beta 4 and .Net 3.5

Dino Viehland dinov at microsoft.com
Fri Aug 15 18:37:12 CEST 2008


You'll need to alias Microsoft.Scripting.Core.dll when you're building a 3.5 project.  From the command line this is

Csc /reference:MSCore=Microsoft.Scripting.Core.dll ...

And then you can refer to these namespaces as starting w/ MSCore.  Alternately you can leave out the System.Core assemblies and the C# compiler will use the version that is present in MS.Core.  This would be:

Csc /noconfig ...

This works because MS.Core includes most of the basic LINQ stuff for expression trees - it's just missing all of the fun extension methods.

From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Dody Gunawinata
Sent: Friday, August 15, 2008 1:18 AM
To: users at lists.ironpython.com
Subject: [IronPython] IronPython 2 Beta 4 and .Net 3.5

Try the following code with a .Net 3.5 setting

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ClassLibrary1
{
    public class Class1
    {
        public void Do()
        {
            Func<string>  f = () =>  "" ;
        }
    }
}

This is what I got

Error 36 The type 'System.Func<TResult>' exists in both 'C:\Users\Adam\Desktop\IronPython-2.0B4\Bin\Debug\Microsoft.Scripting.Core.dll' and 'C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Core.dll' C:\Users\Adam\Desktop\IronPython-2.0B4\Src\ClassLibrary1\Class1.cs 12 13 ClassLibrary1



--
nomadlife.org<http://nomadlife.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20080815/3d0b307f/attachment.html>


More information about the Ironpython-users mailing list