Visual Studio 2102 not a known element

7 posts, 1 answers
  1. RBarnes
    RBarnes avatar
    46 posts
    Member since:
    Oct 2012

    Posted 10 Jan 2014 Link to this post

    Telerik Version 2013.3.1114

    Windows 7 Professional

    For Projects that are created in VS2010 that are updated to VS2012 I get xxxx is not a known element for all Telerik controls.

    I've reinstalled, VS2012 multiple times, I've re-installed the web Extensions multiple times, along with Telerik Controls.

    Controls are rendered in Designer, but not in Source View.  All Controls are available in the toolbox in designer or source view.

    If I create a new project in VS2012, Telerik controls seem to work.  I've compared virtually everything I can find and see no differences.  I've used the web.config for a newly create project for the ones that have been migrated, no luck.  I've deleted and re-created app pools, deleted and re-create iis applications, etc. etc.

    I've tried using 4.0 and 4.5 controls, no difference.

    I've tried virtually every fix I could find, short of fdisk.  We've tried to install VS2012 on another machine, update a VS2010 project to 2012, same exact results on multiple machine.

    I even thought about abandoning VS2012 and going up to 2013, but VS2013 doesn't yet support BI projects, so that's out, as most every project has a BI project.

    I'm at a complete loss and dead in the water with going to 2012 for all of my projects. 

    Any help in trying to diagnose this would be greatly appreciated.

    Roger

  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3600 posts

    Posted 14 Jan 2014 Link to this post

    Hi Roger,

    This is quite the strange report. We have had cases when the design-time editor does not show our controls, but that is usually fixed by adding proper references to the Design assembly and restarting VS. In source view, however, it is quite strange that you get errors.
    It is possible that VS has not read the assembly properly, and would show some error as a tooltip, but the page would work and the intellisense would show up. This, however, is usually fixed by closing and reopening the page and/or VS.

    What I can suggest at this point is:
    - clear temporary ASP files and the VS assembly cache: http://weblogs.asp.net/psheriff/archive/2011/11/08/clean-up-after-visual-studio.aspx
    - see if disabling other third party addon/extensions on VS helps. It is possible that some of them are interfering with the project
    - look for something specific in the project that could be causing this, e.g., an assembly reference, some project setting, etc. Comparing it with a project that works could yield the difference.

    If all of these ideas fail I would advise that you open a ticket and send us the project that causes the issue along with some screenshots and/or a video of the problem, so we can try to reproduce and investigate it.


    Regards,
    Marin Bratanov
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3600 posts

    Posted 14 Jan 2014 Link to this post

    Hi again Roger,

    I just wanted to follow up with some information we just found through an unrelated support ticket.

    The same error (<control> is not a known element) was reported for all controls inside a content page. This happened when the placeholder from the master page was wrapped in an asp:Table control and a RadSplitter control. The master page showed up properly, but the content element in the content page did show this error in source view.
    A possible workaround is to wrap the placeholder inside a simple div. At this point we still do not know why this occurs, nor do we have reliable steps to reproduce it in all cases and it seems like some quirk in VS. Nevertheless, if you are having this issue with content pages, you can try that workaround.


    Regards,
    Marin Bratanov
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  5. Answer
    RBarnes
    RBarnes avatar
    46 posts
    Member since:
    Oct 2012

    Posted 14 Jan 2014 Link to this post

    Thanks Marin for the reply.

    I have already tried your suggestion of the clearing the temp and cached files multiple times to no avail.  I tried again for good measures not change. 

    In addition I had compared a newly create project to the ones that had the issue with unknown element in source view, I couldn't find anything significantly different.

    However, in my efforts to diagnose this issue, I made a copy of my project that had this issue in VS2012, and started removing things, shutting down VS between each change and retrying a simple webform.aspx with no master page and dropping a <telerik:Scriptmanager on the page, check designer and then check source view, same issue with unknown element.

    Most all of my project contains multiple web applications within the same solution, so I started removing projects, and after I remove the last web application sub-project within the solution, then rechecking my webform.aspx in my main project, everything seemed fine.

    The last web project removed from the solution was named Help, so I thought maybe it's something to do with the name Help.  I then copied my copy back over and started over, removing just the Web Application Help.  Rechecking my webform.aspx, the problem was back.  So I removed all remaining web applications only, leaving everything else the same, rechecked my webform.aspx and everything was fine again.

    At this point I had it narrowed down to my web-applications within the solution.  I then checked the settings for each and I had my build output path set to ..\bin\ which put all my dlls in the main projects bin directory which was handy when doing a deployment to a  file system, which yielded a single bin directory, however this only worked up to VS 2008, deployments in VS2010 forward still create a bin under each web applications directory, that I manually remove when I do deployments.   Anyway, I remove the ..\ and set it back to the default of bin\

    rechecked my webform.aspx and viola everything was working as expected, no more unknown elements.

    I've tested this on multiple applications and removing the ..\ from the web applications build output path seems to do the trick.  Or at least it has on all of my projects that I've tried it on.

    Talk about a long detailed process of elimination, but I believe I've found the trick.

    I would be curious if someone else would create a project in vs2010 and add a couple web application projects to the same solution, and set the build output to ..\bin\ then migrate the 2010 app to VS2012 to see if they have the same issue that I seen with the unknown element with all Telerik controls while in source view in the VS2012 app.

    Hopefully this will save someone some time, as it's cost me allot of time diagnosing this one.

    On a side note, I find it rather interesting that Telerik's RadEditor spellcheck, doesn't recognize the word Telerik by default.

    Thank you again for looking into this.

    Roger

  6. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3600 posts

    Posted 15 Jan 2014 Link to this post

    Hi Roger,

    I am glad to hear that you have managed to fix this. Thank you for sharing your experience with the community :)
    I have taken the liberty of marking your post as an answer to the thread and making the most important pieces bold so other people will find them easier. I also updated your Telerik points for your contribution.

    On RadSpell and the word "Telerik" - it simply is not an official part of the English language...yet :)


    Regards,
    Marin Bratanov
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  7. Marco Piumi
    Marco Piumi avatar
    29 posts
    Member since:
    Apr 2005

    Posted 22 Jan 2014 Link to this post

    I have the same problem in a solution with some web applications that are referred to as sub directory of the main site.
    To avoid this, add a telerik control, so I go into design mode and everything works like magic.
    After that I delete the newly added control and continue to work in that session of visual studio 2012 without problems.

    The first time back in 2012 vs. the problem reappears and redo it again as described above.

  8. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3600 posts

    Posted 23 Jan 2014 Link to this post

    Hi Marco,

    Thank you for sharing your observations with the community. I have updated your Telerik points also for your contribution.


    Regards,
    Marin Bratanov
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017