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

Creating a new Project causes other to fail

11 Answers 55 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Clifford Lane
Top achievements
Rank 1
Clifford Lane asked on 19 Mar 2010, 03:18 PM
Perhaps someone could explain something very basic to me.

Last week I had a lot of trouble getting an application running after trying an update.  After about three days and reading untold postings I managed to get it back to where it was working.

This morning i created a new RadControls VB.NET Webapplication.  I opened the default.aspx and am getting the "could not load file or assembly....".  So a brand new Radcontrols Web Application does not even work.  And on top of that the application that I spent three days getting work again is now not working again.

What the heck is going on!

11 Answers, 1 is accepted

Sort by
0
Erjan Gavalji
Telerik team
answered on 19 Mar 2010, 03:29 PM
Hi Cliff,

I'm sorry for the frustration. I remember you had some problems with the RadControls installation and the reports.

I believe the problem you describe is the message "Could not load file or assembly 'Telerik.Web.UI, Version...'" in Design mode. I'll try to fix the problem with the initial application you mentioned first and then we can continue with the brand new application.
Can you please give me some more details about it and about the system? Here are the details I need:
  • Which Visual Studio version do you use? Is it 2008?
  • What is the version of the Telerik.Web.UI assemly in the application BIN folder?
  • Is there a Telerik.Web.Design assembly there as well? What is its version?
  • Are there any Telerik.Web.Design assemblies in the GAC (windows explorer -> %windir%\assembly)? What are their versions?
  • Is there a Telerik.Web.UI assembly in the
    [VisualStudioInstallDir]\Common7\IDE
    [VisualStudioInstallDir]\Common7\IDE\PrivateAssemblies
    [VisualStudioInstallDir]\Common7\IDE\PublicAssemblies

    folders? What is its version?
I'm looking forward to your reply.

Kind regards,
Erjan Gavalji
the Telerik team

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 Public Issue Tracking system and vote to affect the priority of the items.
0
Clifford Lane
Top achievements
Rank 1
answered on 19 Mar 2010, 03:39 PM

Erjan:
I deleted the new project and the old one is now ok but i would like to explore what you think the problem was.  Answers below in bold.

Cliff

 

  • Which Visual Studio version do you use? Is it 2008?   2008

  • What is the version of the Telerik.Web.UI assemly in the application BIN folder?  2009.3.1208.35

  • Is there a Telerik.Web.Design assembly there as well? What is its version?  Where should I look for this?

 

  • Are there any Telerik.Web.Design assemblies in the GAC (windows explorer -> %windir%\assembly)? What are their versions?  There are two 2009.3.1208.35 and 2009.3.1208.20

 

  • Is there a Telerik.Web.UI assembly in the
    [VisualStudioInstallDir]\Common7\IDE NO
    [VisualStudioInstallDir]\Common7\IDE\PrivateAssemblies Directory does not exist
    [VisualStudioInstallDir]\Common7\IDE\PublicAssemblies NO

    folders? What is its version?
0
Erjan Gavalji
Telerik team
answered on 19 Mar 2010, 03:58 PM
Hi Cliff,

Thanks for the details. As per the
Is there a Telerik.Web.Design assembly there as well? What is its version?, I meant the application BIN folder, sorry for not being clear.

Here is why I asked for these details:
There are actually two problems that usually happen with RadControls for ASP.NET AJAX in design mode. These are namely:
  1. Telerik.Web.UI assembly could not be loaded
  2. InvalidCastException

The first problem happens when Visual Studio fails "binding" the Telerik.Web.UI assembly, which is located in the application BIN folder and the Telerik.Web.Design assembly, which is in the GAC. This problem occurred with the initial release of Visual Studio 2008, but was fixed in the SP1 release. Unfortunately sometimes the problem happens even when SP1 is applied to Visual Studio. We could not reproduce this locally, but a workaround for that is to copy the Telerik.Web.UI assembly to the [VSInstallDir]\PublicAssemblies. This approach however can itself cause the same problem if the application uses version X of the Telerik.Web.UI assembly, but the assembly in the PublicAssemblies folder is Y (different than X). We explained this in more detail in the Telerik.Web.Design Assembly article.

The second problem happens when the AppDomain of the Visual Studio IDE loads two instances of the Telerik.Web.UI assembly. This might happen when a solution contains two projects - one of them targeting .NET 2.0 and using Telerik.Web.UI v.xxxx.x.xxx.20 and the other one, using Telerik.Web.UI v.xxxx.x.xxx.35. The failure occurs, because the .NET Framework cannot cast NamespaceA in one of the assemblies to NamespaceA in the other.

Having in mind the details you sent and the error message you mentioned, I think that you've encountered the first problem. Can you check the version of your IDE? Does it have the SP applied?

Kind regards,
Erjan Gavalji
the Telerik team

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 Public Issue Tracking system and vote to affect the priority of the items.
0
Clifford Lane
Top achievements
Rank 1
answered on 19 Mar 2010, 04:33 PM
Erjan:
Sp1 is applied for both VS2008 and framework 3.5.
0
Clifford Lane
Top achievements
Rank 1
answered on 19 Mar 2010, 04:47 PM
Erjan:
I was mistaken there is a Telerik.web.ui.dll in the publicassembles but it is version  2009.2.701.35
0
Erjan Gavalji
Telerik team
answered on 19 Mar 2010, 04:56 PM
Hi Cliff,

Okay, it seems you've encountered the PublicAssemblies back-hit problem.
As Visual Studio has SP1 installed, let's check if it won't handle the assembly resolve by itself. Can you please, do the following:
  1. Close all Visual Studio instances;
  2. Delete the Telerik.Web.UI assembly from the [VisualStudioInstallDir]\Common7\IDE\PublicAssemblies folder;
  3. Load the project, using the Telerik.Web.UI assembly, v2009.3.1208.35
  4. Check if design time works properly.

Looking forward to your reply,
Erjan Gavalji
the Telerik team

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 Public Issue Tracking system and vote to affect the priority of the items.
0
Clifford Lane
Top achievements
Rank 1
answered on 19 Mar 2010, 05:35 PM
I did what you suggested.

When I restarted the application and the screens that contain any rad controls now display the "cound no tload... versioin 2009.3.1208.35.... 
0
Erjan Gavalji
Telerik team
answered on 19 Mar 2010, 06:41 PM
Hi Cliff,

I see, that's the reason you've copied the previous version of the Telerik.Web.UI assembly to the [VisualStudioInstallDir]\Common7\IDE\PublicAssemblies folder.

To my regret there are only tow things I can suggest:
  • Download Visual Studio 2008 SP1 and run the installer again to ensure that the previous VS SP1 install is not broken. In addition, run Windows Update to check if there are any critical updates for VS2008 SP1 and install them. Try loading the solution again and check the design time.
  • Copy the Telerik.Web.UI assembly v 2009.3.1208.35  to the [VisualStudioInstallDir]\Common7\IDE\PublicAssemblies folder. Please note, this workaround would cause Visual Studio to display the same error message if when you upgrade, or when you load a project that uses different version of the Telerik.Web.UI assembly. You would need to always ensure that the Telerik.Web.UI assembly in the PublicAssemblies folder matches the assembly in the project BIN.
I'm sorry for not having any other approaches to suggest. By the way, is there another machine where you could try installing RadControls and loading the project? Would it break there too?

Kind regards,
Erjan Gavalji
the Telerik team

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 Public Issue Tracking system and vote to affect the priority of the items.
0
Clifford Lane
Top achievements
Rank 1
answered on 19 Mar 2010, 08:01 PM
Erjan:
I am installing sp1 again now and will try your other suggestion as well.

I really hope that this puts to bed these problems as each time something happens it consumes hours if not days.

Cliff
0
Clifford Lane
Top achievements
Rank 1
answered on 19 Mar 2010, 08:28 PM
Erjan:
Completed the SP1 reinstall and copied the web.ui to the public assemblies and the old ap is working, a new one works and does not break the old one..

I think I know what the real caus of the problem is. When I created the new project I went to add a RadScript manager and got a warning message that the WEB.UI in the bin folder was going to be replaced.  I then noticed that in my tool box I have both 3.5 and 2.0 version of rad controls and I may have been selecting from the 2.0 list in projects that were 3.5 based.  I have removed the 2.0 to prevent this from happening.

Thank you for taking to time to research this.

Cliff
0
Erjan Gavalji
Telerik team
answered on 19 Mar 2010, 10:39 PM
Hi Cliff,

I would suggest that you try loading the solution without having the Telerik.Web.UI assembly copied to the [VisualStudioInstallDir]\Common7\IDE\PublicAssemblies folder first. This is the natural way Visual Studio should work. If everything is fine without the second step I suggested you won't experience the same trouble the next time you upgrade RadControls.

I wanted to make another note: if you don't want to have the NET20 toolbox items appear again when you start Visual Studio, I suggest that you uninstall RadControls, start the installer again, enter Custom install mode and deselect the .NET 2.0 components.

Best regards,
Erjan Gavalji
the Telerik team

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 Public Issue Tracking system and vote to affect the priority of the items.
Tags
General Discussions
Asked by
Clifford Lane
Top achievements
Rank 1
Answers by
Erjan Gavalji
Telerik team
Clifford Lane
Top achievements
Rank 1
Share this question
or