Ambigious reference for ExtensionAttribute when using Iron Python in Asp.Net
Asked Answered
S

1

49

I get the following error when starting an Asp.Net site that uses an assembly that in turn makes use of the dlr and Iron Python for scripting.

BC30560: 'ExtensionAttribute' is ambiguous in the namespace 'System.Runtime.CompilerServices'.

The issue seems to be known and there's a workaround in the issue tracker.

However it says that they...

... hope that this workaround will not be necessary in the next release.

The latest release (the one that I'm using) is a later release than the one mentioned in the report. I've also tried downloading the file supplied in the issue tracker and replace the one from the current release, but that does not work either.

Is there a solution to this other than downloading the source and doing the build manually?

Shinto answered 7/5, 2009 at 16:8 Comment(2)
Related: #11025600Natie
Patrik, which version of .net are you using and which version of iron python are you using?Halve
C
1

The bug only seems to have been closed because of the DLLs attached to the report, so I think the answer is "no, there isn't a better way".

I asked on the bug why it's closed if the issue still exists, though.

Cheesecloth answered 15/1, 2014 at 20:52 Comment(2)
It's closed because we simply couldn't find a way to fix the problem for VB. If I remember correctly, the workaround is to find a different way to copy that extra assembly to your output directory. The problem should only happen if you try to reference it. Besides, shouldn't everyone be on .NET 4.0+ by now? ;)Crosslegged
Oops, I just read the CodePlex comments again and now I remember more. The workaround is to use the DLL attached to the issue instead of the one that ships with IronPython. Instead of containing a copy of the ExtensionAttribute class, it has a type redirect to the real assembly -- which means that there should still be only be one copy of the class if this version is used.Crosslegged

© 2022 - 2024 — McMap. All rights reserved.