We're having problems opening design view after a multi-project upgrade. The upgrade seems to have succeeded. It compiles and runs without any issue.
Some of the forms, however, show this error when attempting to go into Design:
Unable to cast object of type 'Infragistics.Win.Appearance' to type 'Infragistics.Win.Appearance'.
with this in the call stack:
at Infragistics.Win.AppearanceHolder..ctor(SerializationInfo info, StreamingContext context)
Whats up?
Thanks.
I believe we have a solution.
"Workaround 6" in this Knowledge Base article seems to be the key for us. Eliminate any lines referencing Appearance objects. Hmmm. That will reduce our codebase by 25%!
Steps:
1) Open the designer.vb code for the form in question (yes, this requires editing designer code)
2) Open the search/replace dialog (Cntr + h)
3) In the Search box enter exactly this->^.{.*Appearance.*}$\n
4) Leave the Replace box empty
5) Expand Find options and check Use: Regular expressions
6) Replace All
7) Save and close
8) Rebuild
9) Open form in Designer.
Hello Dgennetten,
I am going to open you a support case for you and I will contact you to get more details about your project.
Sincerely,DimiDeveloper Support EngineerInfragistics, Inc.
Yes, we have no problem compiling each version from the same developer machine. The issue is not incorrect references.
You mention using the versions from the gac. Again, I am not aware that Visual Studio allows that. Can you clarify? This is a Designer-only issue. Not a references issue.
Hello, Yes, a windows application can be configured to work with specific version when multiple versions are installed on one developer machine. But one project can use only version. What you need to do is to verify that you have set the correct versions , also as I mentioned before I recommend you to use the versions form gac. Sometimes the components require to load some related dlls that are not specifically referred and the first place that the framework search is the gac. So to avoid to load the incorrect version you should set the referenced dll’s in your project to UseSpecificVerson set to true. This can be done when you pick the references dll and go to the properties window.I hope this solve your problem.Sincerely,DimiDeveloper Support EngineerInfragistics, Inc.
This appears to be a Visual Studio issue. Both versions exist in the GAC. Builds using either version continue to work fine. VS Designer, however, appears not be be able to reliably load the appropriate version when both are installed. If either version is uninstalled, Designer can -- with some bin and reference purging -- be made to work fine.
Is there any way to get around this cleanly with a dual IG install?