"extensionattribute" error while trying to render user control using a macro
Hey Guys,
I am getting the following error, when I try to add a user control using a macro. My user control contains only a asp .net login control.
"Error creating control (usercontrols/XXXXX.ascx).
Maybe file doesn't exists or the usercontrol has a cache directive,
which is not allowed! See the tracestack for more information!
extension attribute is ambiguous in the namespace System.Runtime.CompilerServices"
Umbraco Version: 4.5.1
.Net Framework: 4.0
dll compiled in VS 2010.
I did add the dll to the bin folder and the user control to the usercontrols folder in umbraco. (All of this was working in 4.0.4.2). Please help as we are running out of time.
I had a similar issue referencing a .NET 2 version of JSON.NET in a .NET 4 project. Are you using any third party ddls in your macro? If so try and find a later version of the dll. A .NET 3.5 should be adequate if a .NET 4 version can't be found
@Sebastiaan - I am not sure I understand what you mean. The only thing I have in this user control is the login control with no code behind. Can you please elaborate?
Go to the developer section and select your macro. Click on the "browse properties" button. if there is a compilation error with your control, as seems likely, then this will give you a more useful error pin-pointing the incorrect code.
The attached file can be used to replace the file in the release. It will redirect the ExtensionAttribute type to System.Core, thereby eliminating the second copy of that class. This file is even more "not supported" than the rest of IronPython :).
"extensionattribute" error while trying to render user control using a macro
Hey Guys,
I am getting the following error, when I try to add a user control using a macro. My user control contains only a asp .net login control.
"Error creating control (usercontrols/XXXXX.ascx).
Maybe file doesn't exists or the usercontrol has a cache directive, which is not allowed! See the tracestack for more information!
extension attribute is ambiguous in the namespace System.Runtime.CompilerServices"
Umbraco Version: 4.5.1
.Net Framework: 4.0
dll compiled in VS 2010.
I did add the dll to the bin folder and the user control to the usercontrols folder in umbraco. (All of this was working in 4.0.4.2). Please help as we are running out of time.
Thanks in advance
Vijay
Have you tried debugging in Visual Studio to see where this exception is being thrown?
I had a similar issue referencing a .NET 2 version of JSON.NET in a .NET 4 project. Are you using any third party ddls in your macro? If so try and find a later version of the dll. A .NET 3.5 should be adequate if a .NET 4 version can't be found
Thinking about it, I got that error after creating extension methods after adding the reference to the dll
Thank you both for your quick responses.
@elspiko - We dont use any third party dlls.
@Sebastiaan - I am not sure I understand what you mean. The only thing I have in this user control is the login control with no code behind. Can you please elaborate?
Vijay,
Go to the developer section and select your macro. Click on the "browse properties" button. if there is a compilation error with your control, as seems likely, then this will give you a more useful error pin-pointing the incorrect code.
Paul,
I did do that and thats where i got the error i posted. I also looked at the umbraco debug trace and that was the same error too.
Is your code in VB.NET? If so, that is causing the error. Please vote for this issue here and/or here.
I fixed the problem by downgrading the version of Microsoft.Scripting.ExtensionAttribute dll to 2.0
Please note that dll is not from Microsoft, but slapped together by someone to link the ExtensionAttribute class to another assembly;
is working on a reply...