This is a migrated thread and some comments may be shown as answers.

Telerik Controls disappear from designer.cs in our framework

21 Answers 441 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Anders
Top achievements
Rank 1
Anders asked on 25 Apr 2014, 07:35 AM
We are in middle of migrating our ASP.NET web-form framework from Visual Studio 2008 en .Net 3.5 to Visual Studio 2013 an .Net 4.5.

The framework is build with Telerik ASP.NET AJAX and we use very few other libraries. The basic idea is that we have one main Telerik web application with a master page and a web.config file. All our application are sitting in there own folder under the main project and make use of the master page and web.config file of the main project. This have worked well for the last 5 - 6 years and also work after the migration.

But the problem is if I open a web-form page or a user control in one of our application and make changes to the html code, then all the used Telerik controls disappear from the designer.cs file of the page or user control and only the Telerik controls. This didn't happens under Visual Studio 2008 .Net 3.5.

After a lot of investigating it seems to be the use of the master page in applications under the main project.

I have build a small solution to illustrate the idea of our framework with the main project ("Framework") and one application ("App1"). If I open the default.aspx in App1 in designer mode I get error op the RadAJAXManager and the RadScriptmanager both placed in the master page - see images attached "Designer.png" and in the source mode get an error on the reference to the master page - see images "Source.aspx.png". 

Unfortunately I can't replicate the problem that the Telerik controls disappear from the designer.cs :-(

So I have two questions. What can be the reason that the Telerik controls disappears from the designer.cs and is the idea / structure of our frame work OK or is there a better way?

Anders Pedersen 

21 Answers, 1 is accepted

Sort by
0
Slav
Telerik team
answered on 29 Apr 2014, 09:54 AM
Hello Anders,

The error message that is visible in designer.png indicates that the Telerik controls on the page are not registered correctly. Nevertheless, they appear to be added correctly in the sample project you sent - there is an entry in the controls section in web.config for the telerik tag prefix - and there are no errors when I run the page.

The marking in source-aspx.png shows that there is something wrong with finding the specified master page or a problem within the master page, because there is no information about this problem.

When I ran the project you attached, I did not encounter the described problem. It should be noted that I performed some modifications in order to make it runnable on my end. I removed the solution files, edited the project file to remove the IIS binding and I referenced the Telerik assemblies from the local bin folder as I did not have them installed in my GAC.

I am attaching the modified project so that you can check it and use it as a reference for fixing the issue on your end. Note that the Telerik assemblies are removed from the sample so that the attachment is smaller in size.

Regards,
Slav
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Anders
Top achievements
Rank 1
answered on 01 May 2014, 07:00 AM
Thanks Slav for your answer. I appreciate your effort very much.

I have downloaded your modified project and it get even more strange! 
I open your project reconnect the Telerik dll's and doe a rebuild. Every thing looks fine in design mode and I can run the project without problems. But I the close the project and reopen it. Now the master page and the content pages shows the same errors in design mode. Se attached images.

Now I start to doubt of there maybe something wrong with my develop machine - the VS install or the Telerik install?

Does any one have a suggestion how to solve this problem.

0
Anders
Top achievements
Rank 1
answered on 01 May 2014, 07:18 AM
One more thing. I can replicate this behavior with a new project.
0
Anders
Top achievements
Rank 1
answered on 01 May 2014, 07:33 AM
Some more information.

I can temporally solve the problem by removing the RadAJAXManager and the RadScriptManager from the master page run the application and then insert the two Telerik components again on the master page. Then I don't get any errors in design mode until I close the project and open it again.

So I dependently think the problem is related to the Telerik components. 
0
Rumen
Telerik team
answered on 06 May 2014, 08:20 AM
Hi Anders,

The Telerik assemblies are standard .NET assemblies which are built and follow all .NET guidelines and best practices for dll creation.

The problem is odd and could be due to a broken reference to the Telerik.Web.UI.dll.

Can you please try the suggestions provided in Unknown server tag/Could not load file or assembly errors section in this help article?

Best regards,
Rumen
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Anders
Top achievements
Rank 1
answered on 08 May 2014, 07:13 AM
Rumen thanks for your answer.

I'm sure your assemblies are OK. I have read the article but I didn't find a solution yet.

But I'm a step further. I'm now sure that the problem is on my developer machine. By a colleague we have copied the solution and there the Telerik components don't disappears from the designer.cs on his machine.

But I still don't have solution. Apparently I messed up my installation some where.

Any one have suggestion on have to fix it. 
0
Marin Bratanov
Telerik team
answered on 08 May 2014, 12:55 PM

Hi Anders,

First, since this is isolated to a certain machine, I would advise comparing some settings/installed software, especially VS plugins to try and find a difference. 

We've had a similar report related to VS and TFS integration. The issue was different (designer.cs fiiles were not being updated) but I will share the information with you in case it helps.

When VS2013 was tied to TFS (I am not sure of the version, perhaps 2010 was in the previous report) and the Get Everything when a solution or project is opened under Options -> Source Control -> Environment was selected, VS would not update the designed files. That was not just related to our controls, it happened with all standard controls too.

Thus, you can try unselecting this checkbox or temporarily removing source control binding to see if this is the case with you as well.

Regards,

Marin Bratanov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Anders
Top achievements
Rank 1
answered on 27 May 2014, 11:03 AM
Thanks Marin,

I have discontinued this project and are sitting in another company now, so I don't have the machine any more. I hoop newer to run into such a problem.

But thanks any way.
0
Luca B
Top achievements
Rank 1
answered on 03 Sep 2015, 08:29 AM

Sorry to bring up an old post, but I have the exact issue described here (plus a slightly different one).

I have a root ASP.NET application that hosts several sub applications (they all reside in the same folder, the projects only include the relevant files for each application).

The issues are 

- I have a RibbonBar control in an .ascx that gets deleted from the designer.cs each time I save the .ascx file. I "solved" this moving the control declaration in my .cs file

- I have several pages hosting different Telerik controls which definition in the designer.cs files has the case of the tag in the .aspx file. So if the tag is telerik:radpane (all lowercase) this is the class name that I find in the designer.cs, so the project doesn't build

Any idea why these happen? Is it something related to the application structure?

Thanks

0
Sypher
Top achievements
Rank 1
answered on 03 Sep 2015, 04:38 PM

I'm having this issue as well and it's driving me crazy! We've been using the Telerik controls for almost 10 years now. After moving to VS2015, the Telerik controls occasionally get removed from the designer.cs files when an ASPX or ASCX file is edited. Moving the declarations that were in the designer file to the code-behind file instead is a work-around, but we should not have to do that. Sometimes, I can fix it by uninstalling and re-installing the controls on my machine through the Telerik Control Panel, sometimes I can fix it by removing all of the references in the project, copying the Telerik DLLs to the bin folder, and referencing them there, and sometimes no matter what I do it won't fix itself for a few hours, then all of a sudden I do one of the same steps and it works.

This seems to be tied to the NEW way Telerik is using the built-in licensing in VS2015, including the new licenses.licx file. I don't know of a solution yet.

0
Sypher
Top achievements
Rank 1
answered on 03 Sep 2015, 04:43 PM
I just noticed my licenses.licx file is showing v2015.2.826.45 for the first 11 controls, then v2015.2.729.45 for the last 5. I can't think of any reason that should ever be the case. All of those controls are in the same DLL, so I would think the file would show them all the same, one way or the other.
0
Sypher
Top achievements
Rank 1
answered on 03 Sep 2015, 05:55 PM

I found something that worked for me this time:

I uninstalled the Telerik VS Extension, reopened VS 2015, loaded the solution, removed the Telerik references and the previously-copied DLLS in the bin folder, copied in the latest DLLs, added references, and then everything was working again.

Eventually, I would like to have the extension installed again, but for now at least I can continue working.

0
Luca B
Top achievements
Rank 1
answered on 04 Sep 2015, 09:52 AM

Thanks for the suggestions, Sypher!

I had this issue before installing the VS Extension, actually I tried to install it to SOLVE the problem :)

I didn't think to look in the .licx file, I will give it a shot.

Thanks again

0
Marin Bratanov
Telerik team
answered on 04 Sep 2015, 10:12 AM

Hi guys,

We have not had other reports about such issues and the only one we have managed to reproduce is the one I mentioned before about the TFS integration.

As for the licensing - we use the standard .NET licensing mechanism, so VS should be able to work with it without issues. Nevertheless, you can try deleting the contents of the license file, or deleting the entire file to see if this helps. This will cause VS to generate it again, so it should be correct.

I will also add the information you have provided to the Design-time Troubleshooting article for anyone else who stumbles upon such a problem: http://mbratano/devtools/aspnet-ajax/general-information/troubleshooting/design-time-troubleshooting#designer-files-are-not-updated-or-are-missing-telerik-controls. This new section will go live with our next documentation upload.

If you find further information, feel free to contribute to our GitHub repo with the details. The easiest way is to click the Edit this Page button on the top right-hand side corner.

Regards,

Marin Bratanov
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Sypher
Top achievements
Rank 1
answered on 04 Sep 2015, 03:25 PM

More about my environment. I have two machines I work from: one at the office and one at home. Both are running Windows 10 Enterprise with VS 2015 Enterprise. I am using visualstudio.com for TF​VC. The project has multiple master files, user controls, and pages.

After deleting the .licx file yesterday, removing the Telerik VS Extensions, and redoing the DLLs and references, everything was working fine. I checked in my changes and went home. No new .licx file was created. There is a lib\RCAJAX\2015.2.826.45 folder structure in the solution, but it has no files. I did some work on the project from home and everything was still fine. Checked in my changes and came back to work today. Manually got latest, started working on an ASCX page, and voila, the Telerik entries were automatically deleted from the designer file again.

The VS Get Everything when a solution or project is opened isn't the issue. I don't have that turned on, and the problem isn't that the designer files aren't getting updated, it's that they ​are getting updated, albeit incorrectly, as soon as I save changes to an ASPX or ASCX file.

It very well could have something to do with version control or with licensing, but without knowing exactly what is happening, I wouldn't want to list all of the things we are trying in the GitHub repo.

The empty lib folder structure is interesting to me. I'm going to try to get this all working again today and see if that has anything to do with it...

0
Sypher
Top achievements
Rank 1
answered on 04 Sep 2015, 04:51 PM

I've tried every combination of using DLLs from the GAC, not from the GAC, in the bin folder, assembly listed in the web.config, Extensions installed and uninstalled, and I haven't been able to get back to working. I tried what worked yesterday and it didn't work today. So I'm stuck again. I keep thinking, "This shouldn't be so hard" and "it's got to be something simple," but nothing is working. This is a freshly installed machine, but I'm using a very old solution, so maybe something else is messed up in here. It's just not immediately obvious. Still no license file, so that is a bit odd. Oh well, time for lunch.

0
Sypher
Top achievements
Rank 1
answered on 04 Sep 2015, 06:31 PM

Just tried from a different machine running Windows 8.1 and VS 2013 and the same project worked fine. So since this machine is all still fresh, I decided to totally delete the local copy of the solution and then Get Latest from TFVC. That worked! So my only guess is something was messed up on the local copy of the solution. It would be nice to know what that was specifically. As I'm sure this will come up again, next time I'll try to wipe the local solution first.

I still don't have a .licx file. I'm confused as to when it should show up.

0
Marin Bratanov
Telerik team
answered on 08 Sep 2015, 08:24 AM

Hi,

The ~/lib folder is where our VS Extensions can store files when getting a new release directly from VS. You can control that folder's location from their options: http://docs.telerik.com/devtools/aspnet-ajax/general-information/integration-with-visual-studio/visual-studio-extensions/visual-studio-extensions-options.

As for the license file - VS should generate it when you add a new licensed control to the markup. For example, if you add a new form and add a RadEditor on it, VS should generate the license.licx file in the root and the App_Licenses.dll in the BIN.
If you only edit existing control declarations, the license file would not be generated.

Regards,

Marin Bratanov
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Sypher
Top achievements
Rank 1
answered on 29 Sep 2015, 08:53 PM

I just had the same issues again. Everything is working one day, then the next time I open an ASPX or ASCX file to edit it, all of the Telerik controls get removed from the designer file and won't come back. If I create a new Telerik Web App, it works fine in there, so at least my environment seems to all be okay.

 This time, after removing the Telerik references and DLLs and setting them back up, it still wasn't working. Then, I deleted the solution's .SUO file (now located in the .vs folder for VS2015) and restarted VS and it worked! Not sure if that was the fix or not. I'm just posting this here so I know what to try first next time. It may have been the SUO file all along. :-P

 

0
Marin Bratanov
Telerik team
answered on 30 Sep 2015, 04:48 AM

Hello,

I have added this idea to the article: http://docs.telerik.com/devtools/aspnet-ajax/general-information/troubleshooting/design-time-troubleshooting#designer-files-are-not-updated-or-are-missing-telerik-controls. This concrete bullet will be live with our next upload.

I do hope that this will resolve the issue for you.

Regards,

Marin Bratanov
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Sypher
Top achievements
Rank 1
answered on 30 Sep 2015, 08:35 PM

I wasn't expecting to have the issue again so soon, but it happened again today. Possibly caused by me upgrading to the 2015 Q3 version that just came out.

Deleting my .SUO file before doing anything else solved the issue! However, I still consider this a workaround. We still don't know why this is happening in the first place. I may try to look at the differences between the bad .SUO file and the new one created after I delete it...

 

Tags
General Discussions
Asked by
Anders
Top achievements
Rank 1
Answers by
Slav
Telerik team
Anders
Top achievements
Rank 1
Rumen
Telerik team
Marin Bratanov
Telerik team
Luca B
Top achievements
Rank 1
Sypher
Top achievements
Rank 1
Share this question
or