When an update has been done to DataPA the assemblies which hold the DataPA .NET controls will likely have had their version numbers incremented and this causes Progress Architect to believe that the DataPA controls are no longer available. Architect doesn’t handle the upgrade of these controls correctly and gives the error ‘Visual Designer cannot load this class’ You may also get the error ‘Could not load file or assembly’.
You will see a screen that looks like this:
To fix this you need to perform the following steps:
- Close the Visual Designer window in Architect for each of the forms in your project that is affected.
- Remove the reference(s) to the old versions of the assemblies. You will be able to identify there by expanding the Reference Assemblies node in for the project. The ones that are causing the problem will have a red cross against them. Right click on each of these and select 'Remove Assembly Reference'. Take a note of each of these assembly references as you remove them.
- Next you need to add in the new assembly references that will replace the old ones that you just removed. To do this right click the Reference Assemblies node in for the project and select ‘Add Assembly References’. This will open up a window listing the available assemblies on your machine. There are two tabs on this windows and you need to select the ‘Global Assemblies’ one. Then for each of the assemblies that you removed in step 2 locate then in the list and select them. There should only be one version of each and you can select multiple assemblies from the list at once.
- Next you need to remove the r-code for each of the affected forms from disk.
- Now you can reopen the Visual Designer for the form(s) and your project should run again as before using the new version of the DataPA .NET controls.