Telerik Telerik
The Telerik Blogs

Visual Studio: “Error Creating Control”

Tuesday, December 23, 2008 by Kevin Babcock | Comments 30

I’ve run into this error before and last night it reared its ugly head again. You’ll find it from time to time when switching to Design View in Visual Studio to work with custom server controls. The bug is in Service Pack 1 of VS and can be quite annoying.

 1 - Error Creating Control Exceptions

It has been submitted to Microsoft and they claim to be working on a solution which will “fix it in subsequent releases” of Visual Studio. Unfortunately, developers (like me) don’t want their productivity to suffer while we all wait for a fix from Microsoft. So here are a couple of steps you can take to try to resolve this issue yourself:

1. Close and restart Visual Studio. Some developers claim this solved the problem for them. I cannot confirm that this works because it did not solve the problem for me, but it’s certainly worth a try since it’s quick and does not require you to modify your system in any way.

2. Delete all project assemblies from your ProjectAssemblies directory.

  • Close Visual Studio
  • Navigate to ProjectAssemblies directory
    • C:\Users\[username]\AppData\Local\Microsoft\VisualStudio\9.0\ProjectAssemblies (Windows Vista)
    • C:\Documents and Settings\[username]\Local Settings\Application Data\Microsoft\VisualStudio\9.0\ProjectAssemblies (Windows XP)
  • Remove all subdirectories
  • Restart Visual Studio

 

2 - ProjectAssemblies Folder

The second solution did the trick for me. Hopefully one of the above solutions worked for you. If you have run into this bug and found an alternate solution, please let me know and I’ll make sure it gets added to the list.

30 Comments

  • PureCode 30 Dec
    I get this problem a lot with out massive framework (which uses Telerik), apart from the ProjectAssemblies method above i also have to empty the "Temporary ASP.NET Files" folder in the "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727" folder.
  • Kevin Babcock 02 Jan
    @PureCode: Thanks for the tip!
  • Kenneth Siewers Møller 06 Jan
    I read somewhere that you could contact Microsoft for a hot-fix. I have no idea why they don't just release a patch for this issue since it seems to be a problem to quite a lot of developers.
  • PureCode 07 Jan
    I actually heard the same from one of my development contacts at Microsoft, but i am still in the dark of WHERE to actually request said hot-fix, or even whether said hot-fix works. I could not find any information regarding it on MSDN. The only source i haven't looked at yet is Microsoft Connect which does have an extensive discussion regarding this issue.

    For now i just settle with a batch file that does all the required 'cleaning', stuck it into the tools menu of Visual Studio so i can start it easily. Still requires to reboot Visual Studio sadly (waste of time, no matter how you look at it).
  • Yohana 08 Jan
    I probe the solution  but didn’t work for me.

    If you know about another way to fix that problem I’ll be thankful.

  • Pete Thedemon 20 Jan
    I had this problem in the telerik demo application and fix it by modifying my web.config.

    I was pretty sure that it must have been something with the environment that I had changed in the way of project references or .NET target runtime because I remember making some changes relating to .NET 3.5 and some messing around with the MS Ajax Extensions.  To cut a long story short I just cut and pasted the supplied Web.Config.NET 3.5 web.config file and hey presto it worked.  This led me to believe that my incarnation of the error message did not relate to a Visual Studio bug.
  • Nick Schils 05 Feb
    Any idea how to fix this in the Visual Web Developer 2008 Express Edition?


  • Kevin Babcock 16 Feb
    Rick Strahl just posted about this issue as well. http://west-wind.com/weblog/posts/628455.aspx
  • Nugs 23 Feb
    I have spent days now attempting to fix this issue. I have dumped all of the following files and folders before rerunning my solution. (VisualStudio 2005 SP1)

    C:\Documents and Settings\[username]\Local Settings\Application Data\Microsoft\VisualStudio\8.0\ProjectAssemblies

    C:\Documents and Settings\[username]\Application Data\Microsoft\VisualStudio\8.0\ReflectedSchemas

    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files

    And i have deleted the solution .suo file. None of the aforementioned actions have resolved my issue:

    Unrecognized tag prefix or device filter 'telerik'.

    or

    Element 'ScriptManager' is not a known element.

    So if anyone has any better idea i am all ears, i have tried every claimed solution i could find on the web. And to be frank - Rick Strahl suggested solution of basically restarting VS is lacking to say the least.



  • Robert 25 Feb
    Not sure if this will work.  Should fix XP/2003 but maybe not Vista/2008.  I have Vista so I haven't tried it. 

    Workaround discussion:
    http://connect.microsoft.com/VisualStudio/feedback/Workaround.aspx?FeedbackID=361826

    KB article with download fix:
    http://code.msdn.microsoft.com/KB961864/Release/ProjectReleases.aspx?ReleaseId=2194

    Good luck...
  • Sumanth 27 Feb
    WOW
    Kevin Babcock


    Your Second Soultion Worked for me

    Thank You Very Much

    I am facing a Lot Problem with same issue BUT i got solved thanak you
  • haitham 28 Apr
    Cleaning the project assemblies did it for me..

    Thanks
  • Harsh 20 May
    This hotfix from MS totally fixed the problem! http://support.microsoft.com/kb/969612/
  • Balazs 23 Jun
    I was having a lot of problems with this and to solve it i had to use the DLL from the Bin35 directory and drag and drop it to C:\WINDOWS\assembly so it would be part of the GAC.
    I had the wrong DLL registered prior to solving my issue.
  • Sandeep 25 Jun
    Alll these microsoft technologies are really fucking ones......... NOTHING IS GOOD.......... EVERYTIME BUGS...BUGS...BUGS........
  • Anon 03 Sep
    If their products are full of bugs, my suggestion would be to stop using them.  Nevertheless, there is no need for that type of language.
  • Bill 17 Sep
    I had the same issue. I deleted the folders and restarted VS. This did not work. I had the page that had the problems opened in the source view. I ran a build on the project which completed successfully. I then switched to design view and the problem was fixed.
  • Pete Bennett 25 Nov
    There is a little too much finessing going here, hit and miss strategies that feel like dbase days or worse something like some old GUI DB from the dark ole days of the 80's.  Time for a cup a tea!

    I've found a few tricks but one issues that seems common is placing these controls in sub directories.  I keep my menus nested ascx, then have an XML file nested below that.  I do this so I can copy controls between sub directoires, tons of time saved.  It's my nemesis as the controls that are 4 levels down create the most trouble. Most of the time I can ignore as they render just fine. 

    More to come .....

    Pete
  • pete Bennett 27 Nov
    I am planning an indepth article on this problem as I've been able to overcome it, send email mailto:pete@petebennett.net?subject=Visual-Studio:-Error_Creating_Control and if I get enough emails, I will post my findings. 

    This problem can be overcome in VS 2010 Beta 2.  I may just creating a script or application to blow out the problems.
  • pete Bennett 27 Nov
    I am planning an indepth article on this problem as I've been able to overcome it, send email mailto:pete@petebennett.net?subject=Visual-Studio:-Error_Creating_Control and if I get enough emails, I will post my findings. 

    This problem can be overcome in VS 2010 Beta 2.  I may just creating a script or application to blow out the problems.
  • Sudhanva 22 Dec
     Follow the below steps apart from the above mentioned process by Kevin Babcock
    1) Install the Telerik Controls.
    2) Copy the Telerik.Web.UI.dll to the GAC (C:\WINDOWS\assembly or C:\WINNT\assembly)
    3) Restart Visual Studio and it *should* all be good
    4) Reboot your computer.

    This will fix the issue.

    Cheers.
  • Justin 23 Dec
    I had success in fixing this problem by following Kevin Babcocks tip, the first comment by PureCode, and copying the .dll into C:\WINDOWS\assembly like Sudhanva suggested above me and then rebooting. Thanks a lot guys!!
  • Job 22 Mar
  • Michael R 15 Jun
    I got this problem - but i'm not using ASP. The tricks arround ASP did not work for me. Remember the old VC++ times, i deleted the .ncb (Intellisense) File, cleaned all Projects and do a full rebuild. After this, it was possible for me, to get the designer work.
  • neOng 09 Jul
    thanks.
  • Salvager 23 Sep
    I am getting an error when I am trying to add telerik to my master file.  The error states "Error Creating Control - Radmenu1  The invoked member is not supported in a dynamic module"  I followed the instructions from the telerik website on how to add this menuing system to Sharepoint.
  • Salvager 23 Sep
    I am getting an error when I am trying to add telerik to my master file.  The error states "Error Creating Control - Radmenu1  The invoked member is not supported in a dynamic module"  I followed the instructions from the telerik website on how to add this menuing system to Sharepoint.
  • Salvager 23 Sep
    I am getting an error when I am trying to add telerik to my master file.  The error states "Error Creating Control - Radmenu1  The invoked member is not supported in a dynamic module"  I followed the instructions from the telerik website on how to add this menuing system to Sharepoint.
  • Salvager 23 Sep
    I am getting an error when I am trying to add telerik to my master file.  The error states "Error Creating Control - Radmenu1  The invoked member is not supported in a dynamic module"  I followed the instructions from the telerik website on how to add this menuing system to Sharepoint.
  • jimnemesis 29 Apr
    thanks for the tip... it was really a great help!

Add comment

  1. Formatting options
       
     
     
     
     
       
  2. (optional, emails won't be shown on public pages)
  3. (optional)