How to Update ComponentOne WPF Controls to .NET Framework 4.6.2
Microsoft is frequently upgrading .NET Framework, including enhancements, bug fixes, security fixes, and many more. To keep up with Microsoft and allow our customers to work with the latest technologies, we have introduced ComponentOne WPF controls for .NET Framework 4.6.2. So, if you are using ComponentOne WPF .NET Framework 4.5.2 controls, this article is worth reading.
In this article, we will see how to upgrade ComponentOne WPF controls from .NET 4.5.2 to .NET 4.6.2.
Why Migrate to 4.6.2?
The .NET Frameworks (4.5.2, 4.6 & 4.6.1) were digitally signed by SHA-1 supporting certificate, which is no longer secure; therefore, Microsoft is ending support for them. However, .NET Framework 4.6.2 and newer versions support newer digital certificates. Please refer to the same from here.
Want to see what else ComponentOne has to offer? Download your FREE 30-Day Trial today!
Key points to remember:
- The control namespaces are the same on both versions, i.e., .NET Framework 4.5.2 & .Net Framework 4.6.2. So, no code change is required while upgrading.
- ComponentOne's WPF controls that were available with .NET Framework 4.5.2 are also available with .NET Framework 4.6.2. So, you don’t have to worry about control availability in .NET Framework 4.6.2.
- C1 WPF .NET Framework 4.6.2 assemblies are also shipped as NuGet packages.
Upgrading to .NET Framework 4.6.2
Follow the below steps to upgrade your project to .NET Framework 4.6.2:
Switching Target Framework
C1 4.6.2 assemblies support .NET Framework 4.6.2 or higher. So, you need to upgrade the project target framework if it’s set to a lower version than .NET Framework 4.6.2
You can follow the steps below to upgrade the project’s target Framework:
- Right Click on Project in Solution Explorer.
- Click on Properties from the popup menu.
- Open dropdown of Target Framework combo-box.
- Select “.NET Framework 4.6.2”.
Updating ComponentOne Assemblies
There are two ways to update ComponentOne Assemblies:
Upgrade using ComponentOne ControlPanel
You can install C1 WPF 4.6.2 version controls from ComponentOne Control Panel by following the steps below:
- Open ComponentOne Control Panel.
- Check the Repair option from the WPF Edition panel.
- Check the .NET Framework 4.6.2 controls option from the right-side menu.
- Click on Proceed Button.
You can download the latest ComponentOne Control Panel from here if you don't have it.
And now, we have C1 4.6.2 assemblies installed on our system. So, now we must update our project with C1 WPF 4.6.2 version controls as follows:
- Open Your project in Visual Studio.
- In Solution Explorer, Open the References node and remove all the existing C1 WPF 4.5.2 dll(s) from project references.
- In Solution Explorer, Right-click on the References node and select the 'Add References' option.
- Browse the following location: ‘C:\Program Files (x86)\ComponentOne\WPF Edition\bin\v462’ and add the required dll(s).
- Rebuild the project.
Upgrade using NuGet Package Manager
You can directly install and download the C1 WPF .NET Framework 4.6.2 controls into your project. The installed version references will replace the old references if they exist. Upgrade to C1 WPF 4.6.2 using NuGet Package Manager. You can follow the below steps:
- In VisualStudio, click on the Tools tab from the top.
- Select NuGet Package Manager -> Manage NuGet packages.
- Open the Browse tab.
- Type the C1 assembly name in the search box as 'C1.XAML.WPF.*' For example, if you want to use C1FlexGrid, you can search for C1.XAML.WPF.FlexGrid.
- Select assembly from the list.
- Select version 4.6.2.xxxxx.xxx.
- Click on the Install button.
You have successfully upgraded to C1 WPF .NET framework 4.6.2 from 4.5.2. The same steps can work upgrading to higher versions until .NET Framework 4.8.
Conclusion
This blog shows how you can upgrade your project to .NET Framework 4.6.2 from the .NET Framework 4.5.2 version. Leave us a comment below if you face any problems while upgrading to the .NET Framework 4.6.2 version.
Want to see what else ComponentOne has to offer? Download your FREE 30-Day Trial today!