Closed GoogleCodeExporter closed 9 years ago
I'm seeing the same issue, but also seeing a CS0656 error too.
warning CS1685: The predefined type
'System.Runtime.CompilerServices.ExtensionAttribute' is defined in multiple
assemblies in the global alias; using definition from 'c:\...\Gallio\Gallio.dll'
error CS0656: Missing compiler required member
'System.Runtime.CompilerServices.ExtensionAttribute..ctor'
Original comment by JasonLaFlair
on 3 Dec 2010 at 4:56
We shouldn't be defining ExtensionAttribute anywhere in Gallio.
Original comment by jeff.br...@gmail.com
on 4 Dec 2010 at 1:35
I confirm the issue. I've seen the same warning a few days ago while using a
v3.3 build just before the release of v3.2.1. I'd presumed it was due to an
incorrect reference somewhere in a project of mine. Now I suspect it might be
in relation with the Mono.Cecil 0.6 to 0.9 upgrade (?)
Original comment by Yann.Tre...@gmail.com
on 4 Dec 2010 at 8:59
I was thinking it might be something along the lines of the Mono.Cecil upgrade.
However that assembly is supposed to be completely internalized.
Original comment by jeff.br...@gmail.com
on 4 Dec 2010 at 9:23
Yeah, Jb has defined his own copy of ExtensionAttribute so he can trick the
compiler into letting him use extension methods. I'm not sure what we can do
about this. We could fork Cecil and reference System.Core, but not if we're
targeting 2.0. There's no warning if your project doesn't reference System.Core.
Original comment by grahamr...@gmail.com
on 4 Dec 2010 at 12:59
Oh that's REALLY interesting. Mono.Cecil is properly internalized into
Gallio.dll. Clients that link to Gallio.dll can't actually access the embedded
copy of System.Runtime.CompilerServices.ExtensionAttribute.
So why are users getting compiler errors now and not before?
Anyways, probably the easiest workaround is to write a tiny little command-line
program that loads the merged Gallio.dll using Mono.Cecil, renames
ExtensionAttribute to something else, then writes it back out again using
Mono.Cecil and signs it with the Gallio key.
Original comment by jeff.br...@gmail.com
on 4 Dec 2010 at 8:02
It wasn't in 0.6. Yeah, sounds like a plan.
Original comment by grahamr...@gmail.com
on 6 Dec 2010 at 10:25
I am seeing the same issue: warning CS1685: The predefined type
'System.Runtime.CompilerServices.ExtensionAttribute' is defined in multiple
assemblies in the global alias; using definition from 'c:\Program Files
(x86)\Reference
Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Core.dll'
Steps to reproduce:
1) Create a new Class Library project in MS Visual C# 2010 Express
2) Open the project properties and make sure the Target Framework is set to
".NET Framework 4"
3) Reference Gallio.dll (I do not have it installed, but just unzipped)
Environment:
- Gallio 3.2.767.0
- Windows 7 x64
- .NET Frameworks available: v2.0.50727, v3.0, v3.5, v4.0.30319
Regards,
Yauhen.
Original comment by yauhen.safrankou
on 6 Dec 2010 at 11:46
Issue 787 has been merged into this issue.
Original comment by Yann.Tre...@gmail.com
on 11 Dec 2010 at 7:42
Same problem here, I'm using Gallio 3.3.153.0. And I don't have any projects
targeting .NET 4.0, just 3.5
Original comment by igor.br...@gmail.com
on 16 Dec 2010 at 9:47
This is fixed in the trunk, will be in the next 3.2 release.
Original comment by grahamr...@gmail.com
on 19 Dec 2010 at 6:41
Original comment by Yann.Tre...@gmail.com
on 24 Dec 2010 at 3:55
Issue 796 has been merged into this issue.
Original comment by Yann.Tre...@gmail.com
on 11 Jan 2011 at 6:32
Thanks for the fix. I tested it on the version 3.2.708.0
Original comment by yauhen.safrankou
on 18 Jan 2011 at 9:43
Original issue reported on code.google.com by
ivan.muz...@gmail.com
on 3 Dec 2010 at 11:35