If you have existing Microsoft® Visual Studio® 2008 projects that use version 7.2 of the NetAdvantage WPF controls, you must perform the steps outlined in this topic to upgrade and compile your projects with the NA/WPF 8.1 controls.
Overview of Changes
Changes to your existing 7.2 projects are necessary because the names of the NA/WPF 8.1 assemblies differ from the names of their 7.2 counterparts as summarized here (changes are in bold):
|Old Name||New Name|
Since the assembly names for NA/WPF 8.1 controls have changed, the assembly references in your project file(s) and Extensible Application Markup Language (XAML) files (if any) must change to reflect the new names.
To upgrade an existing Visual Studio 2008 project from NA/WPF 7.2 to NA/WPF 8.1
- Ensure that you have installed the NA/WPF 8.1 controls on your system.
The easiest way to do this is to create a new empty Microsoft® Windows® Presentation Foundation project in Visual Studio 2008 and bring up the Add Reference dialog box (right click the project in the Visual Studio 2008 Solution Explorer and select Add Reference… from the context-sensitive menu). On the .NET tab in the Add Reference dialog box, scroll the list until you find Component Names that look like 'Infragistics3.Wpf.<ASSEMBLYNAME>.v8.1'.
If you see the entries in the list, the NA/WPF 8.1 control assemblies are properly installed on your system. If not, you may need to re-run the NA/WPF 8.1 installer.
- Before proceeding, make sure that you back up the NA/WPF 7.2 project you want to upgrade.
- Open the existing 7.2 project in Visual Studio 2008.
- Remove the project’s NA/WPF 7.2 assembly references.
Follow these steps to remove the old assembly references:
- Close any open forms designer windows.
- Expand the References node for the project in the Visual Studio 2008 Solution Explorer.
If the project is a VB.NET project, you may need to click Show All Files at the top of the Solution Explorer to show the References node.
- Select the NA/WPF 7.2 assemblies from the list
Make a note of the assemblies in this list, as you will need to add the 8.1 version in the step five below.
- Delete the references.
- Add NA/WPF 8.1 assembly references to your project.
Follow these steps to add the new assembly references:
Note: After adding the 8.1 references as described, be sure to set the Specific Version property to False on each reference added. You can access the Specific Version property by right-clicking on each assembly reference and selecting Properties from the context-sensitive menu.
- Bring up the Add Reference dialog box by right-clicking the project in the Visual Studio 2008 Solution Explorer and selecting Add Reference… from the context-sensitive menu.
- Select the .NET tab in the Add Reference dialog box.
- Select the 8.1 versions of the 7.2 assemblies that you removed in step four.
- Click OK.
- Update assembly references (if any) in your project’s XAML files.
Depending on how the NA/WPF 7.2 controls were originally added to your project’s XAML files, the files may contain hard-coded references to the control assemblies in the generated XML namespace mappings within the XAML file.
- The simple case (no conversion required)
Since all the NA/WPF control assemblies contain default namespace mappings embedded in the assembly, the XAML file should not contain hard coded assembly references. For example, if you add a xamDataGrid to a XAML file in the Visual Studio 2008 Windows Presentation Foundation forms designer, the designer will normally generate a namespace mapping at the top of your XAML file that looks like this:
In this case, there is no hard-coded reference to the control's assembly name; instead, the Visual Studio 2008 Windows Presentation Foundation forms designer used the default namespace mapping defined in the assembly. This takes care of associating the XML prefix 'igDP' with the CLR namespace Infragistics.Windows.DataPresenter in the assembly Infragistics3.Windows.DataPresenter.v8.1. For any XAML file in your project that has the namespace mapping specified in this manner, you do not have to perform any conversion.
See Default XML Namespace Mappings for a list of all the default namespace mappings defined by the NA/WPF assemblies.
- The "hard-coded" reference case (conversion required)
The Visual Studio 2008 Windows Presentation Foundation forms designer does not always use the default namespace mapping provided by the control; instead, it uses verbose mapping syntax that references the complete name of the assembly as in the following example:
In this case, you will need to convert the namespace mapping so it is compatible with the NA/WPF 8.1 assemblies. It is recommended that you change the namespace mapping to use the simplified default namespace syntax, as follows:
Notice that the XML prefix 'my' has not been changed; therefore, no further conversion of your XAML is required. Since you changed the mapping to use the default namespace mapping defined in the assembly, your XAML file will work with the 8.1 version of NA/WPF as well as all future versions of NA/WPF without further conversion.
- The inline "hard-coded" reference case (conversion required)
The Visual Studio 2008 Windows Presentation Foundation forms designer may also use an inline namespace mapping with a hard assembly reference when you add a control to a form, as show in the following example:
In this case, the 'my1' prefix is scoped to the xamDataGrid element. This case also requires a conversion. It is recommended that you change the namespace mapping to use the simplified default namespace syntax, as follows:
- The simple case (no conversion required)
- Clear out the licenses.licx file.
After performing the steps above, you may encounter an error when compiling your project that complains about bad entries in the project’s licenses.licx file. The easiest way to deal with these errors is to delete any entries that reference the NA/WPF controls.