Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Vijay 30 posts 47 karma points
    Jul 29, 2010 @ 00:34
    Vijay
    0

    "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

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Jul 29, 2010 @ 08:37
    Sebastiaan Janssen
    0

    Have you tried debugging in Visual Studio to see where this exception is being thrown?

  • elspiko 133 posts 302 karma points
    Jul 29, 2010 @ 10:02
    elspiko
    0

    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

  • elspiko 133 posts 302 karma points
    Jul 29, 2010 @ 10:05
    elspiko
    0

    Thinking about it, I got that error after creating extension methods after adding the reference to the dll

  • Vijay 30 posts 47 karma points
    Jul 29, 2010 @ 16:50
    Vijay
    0

    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?

     

     

  • Paul Blair 466 posts 731 karma points
    Jul 29, 2010 @ 23:14
    Paul Blair
    0

    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.

  • Vijay 30 posts 47 karma points
    Jul 30, 2010 @ 17:33
    Vijay
    0

    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.

     

  • Marcel81 2 posts 22 karma points
    Jul 31, 2010 @ 03:28
    Marcel81
    0

    Is your code in VB.NET? If so, that is causing the error. Please vote for this issue here and/or here.

  • Vijay 30 posts 47 karma points
    Aug 02, 2010 @ 23:27
    Vijay
    0

    I fixed the problem by downgrading the version of Microsoft.Scripting.ExtensionAttribute dll to 2.0

  • Marcel81 2 posts 22 karma points
    Aug 03, 2010 @ 00:05
    Marcel81
    0

    Please note that dll is not from Microsoft, but slapped together by someone to link the ExtensionAttribute class to another assembly;

    CurtHagenlocher wrote Oct 25 2008 at 1:13 AM
    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 :).
Please Sign in or register to post replies

Write your reply to:

Draft