Cheat Sheets, Best Practices and Troubleshooting
In this article, you will find information on most common issues that may occur after you migrate to a newer version of DevExpress products.
Before you proceed, make sure that you performed these steps:
- Close all currently opened designers
- Clear the Bin and Obj folders
- Remove the licenses.licx file
- Run Project Converter again. Ensure that all projects in your solution and all DLLs that use our components (directly or indirectly) are updated and reference required DevExpress assemblies
- Restart Visual Studio
- Rebuild your project
Refer to the following help articles for details:
Upgrade Notes
How to resolve issues after updating DevExpress controls: Type 'X' exists in both assemblies vs Type 'X' is ambiguous in namespace 'Y'
In some situations, you can resolve the issue by running our installer in 'Repair' mode. If you don't see the issue you encountered in the Known Issues list below, try repairing the installation. If it doesn't help, feel free to create a ticket and share the installation log. You can find it in the installation folder. By default, our components are installed to the following folder: C:\Program Files\DevExpress XX.Y\Components.
Known Issues:
Issue 1. Errors at Visual Studio design time
Solution: See the following article: DevExpress WinForms Troubleshooting - Visual Studio Design Time
Issue 2. Application crashes and one of the following exceptions occurs at runtime:
-
Exception: System.IO.FileNotFoundException
at DevExpress.Utils.AppearanceObject…cctor() -
Exception: System.TypeInitializationException
at DevExpress.Utils.AppearanceObject.ResetDefaultFont()
at DevExpress.Utils.FontBehaviorHelper.Update()
at DevExpress.LookAndFeel.UserLookAndFeel…ctor(System.Object)
at DevExpress.LookAndFeel.UserLookAndFeel.EnsureDefault()
Possible cause and solution:
These exceptions may occur if an assembly required by our components is missing. For example, starting with v20.1, we split the DevExpress.Data assembly and our components now require the DevExpress.Data.Desktop assembly to function correctly. Make sure that you added all missing assemblies after upgrade. Note that Project Converter tool automatically adds the DevExpress.Data.Desktop and other required assembly references to individual projects. Thus, we always recommend using it to update your projects. If your application consists of multiple project, make sure that you upgrade all projects.
Issue 3. Missing API
When you build a project, Visual Studio may report the following errors:
- 'Component' does not contain a definition for 'Method' and no accessible extension method 'Method' accepting a first argument of type 'Component' could be found (are you missing a using directive or an assembly reference?)
- Cannot implicitly convert type 'bool' to 'DevExpress.Utils.DefaultBoolean'
- 'Method' is inaccessible due to its protection level
- 'Method': no suitable method found to override
- 'Method': cannot override inherited member 'Base.Method' because it is not marked virtual, abstract, or override
- etc.
There are two possible causes:
- A missing API no longer exists due to a Breaking Change. We usually describe important changes that affect projects of many users on the following page: Version History. Please open this page to find changes made in your new version and correct your code accordingly.
- You are using a custom descendant of our component that utilizes an internal API, and this API has been changed by DevExpress. Keep in mind that the functionality of private, protected and non-documented members can be changed without notice, as these methods are primarily intended for internal use. If you decided to use an internal API, we cannot guarantee that this functionality will work correctly in newer versions.
If you face such an error after upgrade, check whether your custom component or functionality is available out of the box. We always recommend replacing custom solutions with built-in solutions. If there is no standard counterpart or the custom functionality is still unavailable out of the box, please create a ticket and describe your scenario in detail and explain how you are using an internal API in your scenario. It will help us find the most suitable solution.
Issue 4. An "Expired" or "Trial" splash screen is displayed after upgrade
Solution:
This behavior can take place if your project wasn't updated completely. So, the bin and obj directories contain assemblies of previous versions, or the licenses.licx file wasn't updated. To resolve this issue, follow these steps:
- Delete the bin and obj directories in your project's folder;
- Close all opened designer windows;
- From the Visual Studio Solution Explorer, locate the licenses.licx file in your project directories and clear it;
- Rebuild your project.
Refer to the following KB article for additional information: How to remove the "This is a trial version" splash window.
If this doesn't help, check whether any ~Patch modules are loaded by Visual Studio. Here are some examples:
DevExpress.Patch.Common.dll
DevExpress.Patch.Vsix.VS2015.dll
DevExpress.Patch.Vsa.dll
To get the list of assemblies that Visual Studio processes, you can use Process Explorer in DLL mode as illustrated in the Get list of VS assemblies video.
Note these tools were engineered to circumvent the DevExpress product license authentication mechanism. Typically, they are loaded by an extension installed in your VS.
Please locate and uninstall them as they are illegal. You can use either Control panel in your operating system or VS Extensions dialog box for this. After that, reinstall our products and repeat the steps from this article:
How to remove the "This is a trial version" splash window
Issue 5. Skin-related Issues
Solution: See the following article: DevExpress WinForms Troubleshooting - Skins and Skin Editor
Issue 6. Controls are rendered slower after upgrade
Solution:
Most likely, it is due to the fact that Windows did not generate native images for newly installed assemblies of our components. This process does not happen immediately after installation. Windows keeps track of assemblies in use and creates native images for them later. You use can use the Ngen.exe (Native Image Generator) process to force creation of native images. Refer to the following article for more information: Why does my code take longer to execute the first time it's run?.