TroubleShooting "Could not load file or assembly" error on Upgrading LightSwitch Projects

Sometimes after upgrading your LightSwitch projects containing ComponentOne controls you may get a "Could not load file or assembly" error : 9-11-13-11-55-22 This error occurs because there still exists a reference to an older version of C1Silverlight control (chart/olap/flexgrid/etc) in the project. This error can easily be fixed by using one of the following two solutions.

Solution 1

You can easily resolve it by making some changes in the Config.xml file. Following are the steps for this :

  1. Open config.xml file in the Client folder of the Project.Make sure that you have selected the File View instead of Logical View in order to access the Client folder in Visual Studio 2012.
  2. Delete the lines that contain C1.Silverlight version 4.0.20XXX.XXX.
  3. Rebuild your application.


Solution 2

If solution1 does not help, please try the following steps :

  1. Create a new project.
  2. Add C1Lightswitch extensions in your applicaitons.
  3. Open Config.xml file and copy the C1LightSwith entries text.
  4. Paste the copied text into Config.xml of your existing application.

The required changes are to delete all the entries which contains the version mention in the error from the ExtensionAssemblies tag in the Config.xml . Once you have deleted all the faulty entries, Rebuild the application and now, it should run without any issues. If case both the above two solutions fail, please post on our forums or submit an incident report to our Community team.


GrapeCity Developer Tools
comments powered by Disqus