Hi.
We recently upgraded to VS2015 in our company, and due to incompatibility between Visual Studio 2015 and our older dotConnect version (dcmysql670pro.exe, dll version 6.70.302.0), we had to install a new dotconnect dcmysql84pro.exe that also contains new dll versions to be able to compile licence files.
Is it possible to still use our old assemblies (6.70.302.0) in Visual Studio 2015? It seems that dotConnect installs bindingredirect policy files in the GAC_MSIL folder, that makes our applications on local machines use version 8.xxx instead of 6.70.302.0. On test environments, our applications still are able to use 6.70.302.0, but locally it seems not possible.
Please advice!
Kind regards
Using an older version of devart dlls with Visual Studio 2015
-
- Devart Team
- Posts: 2420
- Joined: Wed 02 Nov 2011 09:44
Re: Using an older version of devart dlls with Visual Studio 2015
You can delete the policy.*.Devart.* files from the GAC. In this case your application will load the dotConnect for MySQL 6.70.302 assemblies. However, your application won't work with them. When an application is built, the corresponding license resource is embedded in the result file. dotConnect for MySQL must be installed for this. Since you have dotConnect for MySQL 8.4 installed, the license resource for the 8.4 version is embedded into your application. dotConnect for MySQL 6.70.302 uses different key for checking the license resource.Is it possible to still use our old assemblies (6.70.302.0) in Visual Studio 2015? It seems that dotConnect installs bindingredirect policy files in the GAC_MSIL folder, that makes our applications on local machines use version 8.xxx instead of 6.70.302.0.
dotConnect for MySQL 6.70.302 does not support Visual Studio 2015; however, you can develop an application, using dotConnect for MySQL 6.70.302 with Visual Studio 2015. For this, you need to install dotConnect for MySQL 6.70.302 and compile the license resource manually.
The license resource can be compiled in the following way:
1. Create a text file named licenses.licx and enter the following text inside the licenses.licx file:
Devart.Data.MySql.MySqlConnection, Devart.Data.MySql
2.Generate the license resource file using the following command line:
"%Compiler Path%\lc.exe /target:MyApplication.exe /complist:licenses.licx /i:"%Assembly Path%\Devart.Data.MySql.dll"
Where:
- %Compiler Path% is the path to the appropriate lc.exe file (for example, C:\Program Files\Microsoft.NET\SDK\v2.0\Bin);
- MyApplication.exe is the name of your target executable file;
- licenses.licx is your licenses.licx file;
- %Assembly Path% is the Devart.Data.MySql.dll assembly location.
3. The License compiler will generate the 'MyApplication.exe.licenses' resource file;
4. Add this file to your project as an embedded resource and rebuild the project.
If you have dotConnect for MySQL 6.70.302 installed, you can build your project in Visual Studio 2015. If you have installed dotConnect for MySQL 8.4, delete all the policy.*.Devart.* files from the GAC, and you will be able to build your application with Devart.Data.MySql.dll of version 6.70.302 in Visual Studio 2015.
For more information, please refer to https://www.devart.com/dotconnect/mysql ... ml#compile
Re: Using an older version of devart dlls with Visual Studio 2015
Fantastic stuff. Thanks for the good reply, this is a working solution.
Kind regards
Kind regards