Infragistics2.Win Reference

2.4k views Asked by At

I have inherited a VB.NET application running using Infragistics controls. When I attempt to compile the code I get the following error message: 'Appearance' is ambiguous in the namespace 'Infragistics.Win'.

The following assemblies are referenced causing the problem: Infragistics2.Win.v12.1 - Version12.1.20121.2135 Infragistics4.Win.v12.1 - Version12.1.20121.2135

If I remove the reference Infragistics4.Win.v12.1 I get the following error: Value of type 'Infragistics.Win.Appearance' cannot be converted to 'Infragistics.Win.AppearanceBase'.

And if I remove the reference Infragistics2.Win.v12.1 I get the following errors: Value of type 'Infragistics.Win.Appearance' cannot be converted to 'Infragistics.Win.AppearanceBase'. 'Public Property EditorValueSource As Infragistics.Win.EditorWithComboValueSource' is declared in project 'Infragistics2.Win.v12.1.dll', which is not referenced by project. Add a reference to 'Infragistics2.Win.v12.1.dll' to your project.

I cleaned out references to Infragistics in the licenses.licx file.

Any suggestions?

1

There are 1 answers

0
SteveFerg On BEST ANSWER

Mixing and matching different versions of the controls will do that to you. Infragistics4 is for .NET Framework 4 and Infragistics2 is for .NET Framework 2. In your project properties-> Target Framework, use whichever controls the project is set up for. If you have removed the references, often it is easier to remove the control and add it back in through the VS toolbox, which will put the correct reference back in for you.