[IronPython] problem compiling extension methods on IPy2b5
Curt Hagenlocher
curt at hagenlocher.org
Tue Sep 23 18:04:02 CEST 2008
Ouch.
For now, you can work around this problem by adding an ExtensionAttribute
class to your own source. The code would look like this:
using System;
namespace System.Runtime.CompilerServices {
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Class |
AttributeTargets.Assembly)]
sealed class ExtensionAttribute : Attribute { }
}
On Tue, Sep 23, 2008 at 8:30 AM, Ronnie Maor <ronnie.maor at gmail.com> wrote:
> I have an issue with compiling extension methods. I've read the blog
> <http://devhawk.net/2008/09/17/DLR+Namespace+Change+Fire+Drill.aspx>on
> this, but can't get it to work.
>
> The symptom is that when I have an extension method in my project, I get
> the following error:
> Missing compiler required member
> 'System.Runtime.CompilerServices.ExtensionAttribute..ctor'
>
> If it isn't a trivial mistake with an obvious solution, then let me know
> what other information I should give to help diagnose this
> some things that might be relevant:
>
> my project targets .NET 3.5
>
> my references from proj file:
> <Reference Include="log4net, Version=1.2.10.0, Culture=neutral,
> PublicKeyToken=1b44e1d426115821" />
> <Reference Include="Microsoft.Scripting, Version=1.0.0.5000,
> Culture=neutral, PublicKeyToken=31bf3856ad364e35,
> processorArchitecture=MSIL" />
> <Reference Include="Microsoft.Scripting.Core, Version=1.0.0.5000,
> Culture=neutral, PublicKeyToken=31bf3856ad364e35,
> processorArchitecture=MSIL" />
> <Reference Include="IronPython, Version=2.0.0.5000, Culture=neutral,
> PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
> <Reference Include="IronPython.Modules, Version=2.0.0.5000,
> Culture=neutral, PublicKeyToken=31bf3856ad364e35,
> processorArchitecture=MSIL" />
> <Reference Include="System" />
> <Reference Include="System.Core">
> <RequiredTargetFramework>3.5</RequiredTargetFramework>
> </Reference>
>
> thanks
> Ronnie
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20080923/2d92a86e/attachment.html>
More information about the Ironpython-users
mailing list