[IronPython] Error building ASP.NET 3.5 websites

Curt Hagenlocher curt at hagenlocher.org
Sat Oct 25 01:24:51 CEST 2008

Here's what we recommend as a workaround.
The CodePlex work item that tracks this request (
http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=19126) now
contains a modified version of Microsoft.Scripting.ExtensionAttribute.dll.
 For this one particular case, where simultaneous referencing of the
original version of our assembly and System.Core.dll causes problems, you
can replace the "shipping version" of our DLL with the modified version.
 This will eliminate the "is ambiguous" error message.

The magic that makes this work is called "type forwarding".  The updated DLL
simply contains a type forwarder to System.Core for the type
System.Runtime.CompilerServices.ExtensionAttribute.  As a result, there is
no second copy of that class, and the CLR loader redirects all references
from the rest of IronPython to System.Core.

This file, though strongly-named and signed, is even more "not supported"
than the rest of IronPython :).  By this I mean primarily that we haven't
run any test passes using the new assembly, and don't plan to.  However, as
it doesn't actually contain any code, the risks from this modified version
should be very small.

We hope to address this problem differently for the next release, but our
promise to stay compatible with .NET 2.0 for this release has somewhat
constrained the type of solution we are able to offer.  Thanks for your

On Thu, Oct 23, 2008 at 9:56 AM, Fernando Correia <
fernandoacorreia at gmail.com> wrote:

> I'm trying to upgrade from Beta 5 to RC1 and I'm getting, again, errors
> trying to build an ASP.NET 3.5 website that uses IronPython.
> The errors are similar to what happened with Beta 1:
> (0,0): warning CS1685: The predefined type
> 'System.Runtime.CompilerServices.ExtensionAttribute' is defined in
> multiple assemblies in the global alias; using definition from
> 'c:\WINDOWS\assembly\GAC_MSIL\System.Core\\System.Core.dll'
> InternalXmlHelper.vb(9,0): error BC30560: 'ExtensionAttribute' is ambiguous
> in the namespace 'System.Runtime.CompilerServices'.
> I opened issue 19126 with more details.
> Regards,
> Fernando.
> _______________________________________________
> 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/20081024/71c8c9c7/attachment.html>

More information about the Ironpython-users mailing list