0

So I have previously developed a payroll system using c# way back 2010, and I decided to use it again as a reference, I had its ClickOne Application Deployment Manifest, but when I tried to run it an error appears "Unable to install or run the application. the application requires that assembly MySQL.Data Version 5.1.7.0 be installed in the Global Assembly Cache (GAC) first". when I check the GAC on windows/assembly, I had MySQL.Data version 6.2.2.0, Is there a way to change/uninstall this and install a version 5.1.7.0?

I had searched for a possible answer to my questions but most of the results is on publishing, unfortunately I cant republish the application again as I lost my sql database, any help will do as I will continue browsing for possible answer.

thanks in advance.

4

2 回答 2

1

要从 cmd 将 dll 安装到 GAC 中,请使用以下命令。首先找到 GAC 路径。大部分路径将是

C:\Windows\Microsoft.NET\assembly

基于 32 位或 64 位,安装它。在一切之前下载 MySQL.Data 版本 dll 5.1.7.0 并将其放在一个位置文件夹中。并使用以下命令安装它。

Gacutil -i C:\location\Mysqldata.dll

将 dll 安装到 GAC 中。并且 5.1.7.0 和 6.2.2.0 版本都将存在于 GAC 中。

于 2017-04-06T06:32:14.480 回答
0

如果您在 cmd 中找不到 gacutil “此工具会随 Visual Studio 自动安装。要运行该工具,请使用 Visual Studio 的开发人员命令提示符(或 Windows 7 中的 Visual Studio 命令提示符)。有关更多信息,请参阅命令提示符。 " https://docs.microsoft.com/en-us/dotnet/framework/tools/gacutil-exe-gac-tool

于 2020-09-25T12:12:54.337 回答