ExtensionAttribute is ambiguous ... Why is it not getting attention?
BC30560: 'ExtensionAttribute' is ambiguous in the namespace 'System.Runtime.CompilerServices'. [No relevant source lines] Source File: InternalXmlHelper.vb Line: 9
This error is being a pain in the neck for me. For many times I googled it, searched umbraco site and find just a few posts where people talk about it (i mean, really a few). None of these posts has a "real sollution" but workarounds.
The fix (or workaround) is "downgrade" some dll's on the "bin" folder. But since those dll's are there on 4.5 and 4.5.1 i have reasons to believe thay are not meant to be downgraded.
Also, considering the (very low) number of people who talked about this on the forums i have to believe it's not happening with everybody.
So, anything that helps figure this out would be appreciated.
This error will popup almost everywhere i have custom code (user controls, macro parameters, etc).
I though it could be something related to some code i use, my own extensions, third party libraries, etc. So, i made a very simple test:
1- Started a new umbraco installation using the just released 4.5.1 binaries for .NET 4 2- Selected the option to add the Runaway package 3- Tested the installation.
After that i:
1- Created a new visual studio Web Application based on .NET 4 (VB.NET) 2- Removed all unecessary files automatically created by Visual Studio (global.aspx, master pages, app_data, etc) 3- Created an user control with just some text on it, no code behind at all 4- Compiled it and copied the dll and user control to umbraco 5- Added the user control as a Dashboard to the "Content" node by editing the "Dashboard.config"
Get the same error when accessing the dashboard. The only thing now is that i can't blame any custom code or third party library because it's a clean installation.
I'm still hoping somebody can comment on this and help em find a solution. Or even somebody to assure me it's ok to downgrade that dll (workaround).
I'm sorry, don't have a solution for you, but make sure to add your story to CodePlex and vote up the issue so that it can be solved in an upcoming release.
I've just upgraded from 4.5.1 to 4.5.2 (.NET4) and my VB user control (.NET3.5) still does not work. When I click Browse Properties on the Macro page, I get:
System.Web.HttpCompileException (0x80004005): InternalXmlHelper.vb(9): error BC30560: 'ExtensionAttribute' is ambiguous in the namespace 'System.Runtime.CompilerServices'. at blah blah
I have the ascx in the usercontrols folder and the dll in the bin folder.
I then went to the trouble of repeating the process of doing the upgrade from 4.5.1 to 4.5.2, but this time for .NET3.5. And in this case it works fine. The usercontrol properties are displayed and it appears on my webpage.
To complete the investigation (and confirm what others say above), I rebuilt my usercontrol in C# and deployed to 4.5.2 (.NET4) and 4.5.2 (.NET3.5) and both worked fine.
So either Umbraco cannot mix .NET versions for VB user controls, or the original VB user control issue in 4.5.1 has only been fixed for v3.5 usercontrols.
ExtensionAttribute is ambiguous ... Why is it not getting attention?
BC30560: 'ExtensionAttribute' is ambiguous in the namespace 'System.Runtime.CompilerServices'.
[No relevant source lines]
Source File: InternalXmlHelper.vb Line: 9
This error is being a pain in the neck for me.
For many times I googled it, searched umbraco site and find just a few posts where people talk about it (i mean, really a few). None of these posts has a "real sollution" but workarounds.
The fix (or workaround) is "downgrade" some dll's on the "bin" folder.
But since those dll's are there on 4.5 and 4.5.1 i have reasons to believe thay are not meant to be downgraded.
Also, considering the (very low) number of people who talked about this on the forums i have to believe it's not happening with everybody.
So, anything that helps figure this out would be appreciated.
This error will popup almost everywhere i have custom code (user controls, macro parameters, etc).
I though it could be something related to some code i use, my own extensions, third party libraries, etc.
So, i made a very simple test:
1- Started a new umbraco installation using the just released 4.5.1 binaries for .NET 4
2- Selected the option to add the Runaway package
3- Tested the installation.
After that i:
1- Created a new visual studio Web Application based on .NET 4 (VB.NET)
2- Removed all unecessary files automatically created by Visual Studio (global.aspx, master pages, app_data, etc)
3- Created an user control with just some text on it, no code behind at all
4- Compiled it and copied the dll and user control to umbraco
5- Added the user control as a Dashboard to the "Content" node by editing the "Dashboard.config"
Get the same error when accessing the dashboard. The only thing now is that i can't blame any custom code or third party library because it's a clean installation.
I'm still hoping somebody can comment on this and help em find a solution.
Or even somebody to assure me it's ok to downgrade that dll (workaround).
I'm sorry, don't have a solution for you, but make sure to add your story to CodePlex and vote up the issue so that it can be solved in an upcoming release.
One thing i noticed:
It only happens if you use VB.NET. The error can't be reproduced if you use C#.
Thanks for the advice, will add it to codeplex.
No need to add it. It's there already:
http://umbraco.codeplex.com/workitem/28307
I have the same problem, downgrading the DLL does not properly remove this issue because when the site restarts, the error shows once...
I already reported on codeplex too :
http://umbraco.codeplex.com/workitem/28175
It's seems this issue has been fixed :
http://umbraco.codeplex.com/workitem/28307
4.5.2 does not solve this problem at all...
Thomas,
I had the problem in 4.5.1. I created a user control for the contact form and I recived the error mentioned.
I then created a basic control outputting "hello world" just for testing and recived same error. so my code was not to blame.
I tried upgrading 4.5.1 to 4.5.2 same problem.
When I downloded 4.5.2 .net 3.5 version and set app pool to .net 2 interated all was ok.
I then downloaded 4.5.2 .net 4 and the basic user control, which outputted hello world seems to render the message hello world ok.
Thanks for your feedback, gonna try this soon.
edit : downgrading to target framework 3.5 and setting the app pool to 2 seems to solve this problem. Thanks Sajid !
Doing downgrades is not an option for me in my current environment. Do we see a real solution to this issue on the horizon?
Which version are you using? Because I believe it was fixed already.
4.5.2, and it is not fixed. Read some of the conversation above, I'm not the only one who experienced it failing in 4.5.2.
that's weird, i though it was fixed. have to try it again.
I'm using version 4.5.2. Definately not fixed. VB ascx throws error, C# ascx, works fine.
I've just upgraded from 4.5.1 to 4.5.2 (.NET4) and my VB user control (.NET3.5) still does not work. When I click Browse Properties on the Macro page, I get:
System.Web.HttpCompileException (0x80004005): InternalXmlHelper.vb(9): error BC30560: 'ExtensionAttribute' is ambiguous in the namespace 'System.Runtime.CompilerServices'. at blah blah
I have the ascx in the usercontrols folder and the dll in the bin folder.
I then went to the trouble of repeating the process of doing the upgrade from 4.5.1 to 4.5.2, but this time for .NET3.5. And in this case it works fine. The usercontrol properties are displayed and it appears on my webpage.
To complete the investigation (and confirm what others say above), I rebuilt my usercontrol in C# and deployed to 4.5.2 (.NET4) and 4.5.2 (.NET3.5) and both worked fine.
So either Umbraco cannot mix .NET versions for VB user controls, or the original VB user control issue in 4.5.1 has only been fixed for v3.5 usercontrols.
is working on a reply...