问题描述
限时送ChatGPT账号..我正在尝试在客户端的计算机上部署我发布的项目,但安装程序一直给我这个错误微软同步数据服务器版本 2.0.0.0 将首先安装在全局程序集缓存中"
I'm trying to deploy my published project in a client's computer but the setup keeps giving me this error "microsoft synchronization data server version 2.0.0.0 to be installed in Global Assembly cache" first
对此的任何帮助将不胜感激!我在 C# Visual stuido 2010 上工作,我的电脑是 64 位,我的客户电脑也是 64 位谢谢
Any help with that would be appreciated! I worked on C# Visual stuido 2010 and my PC is 64bit, and my clients pc is also 64bit Thanks
推荐答案
您必须在您的客户端 PC 上安装 Sync Framework.也许还有其他一些 Sql 框架.
You have to install Sync Framework on your clients PC. Maybe some other Sql frameworks as well.
此页面说:
在 x86 平台上,x86 安装包会安装将以下组件放入 Program Files\Microsoft SDKs\Microsoft SyncFramework\2.1,并将托管 DLL 添加到全局程序集缓存(GAC).在 x64 平台上,x86 和 x64 安装包安装到 Program Files (x86)\Microsoft SDKs\Microsoft Sync框架\2.1.平台和安装包的其他组合安装路径可能会略有不同.
On an x86 platform, the x86 installation package installs the following components into Program Files\Microsoft SDKs\Microsoft Sync Framework\2.1, and adds managed DLLs to the global assembly cache (GAC). On an x64 platform, both the x86 and the x64 installation package install into Program Files (x86)\Microsoft SDKs\Microsoft Sync Framework\2.1. Other combinations of platform and installation package may yield slight variations on the installation path.
下载链接
如果您希望在安装应用程序时将此作为先决条件,请查看此线程.但是我建议您使用 Inno Script studio 来制作安装程序.(免费且易于使用,但我想逆向工程并不难,只是说).
if you would like to have this as prerequisites when installing the application, look at this thread. However I advise you to use Inno Script studio to make installers. (Free and easy to use, but I guess it is not that hard to reverse engineer, just saying).
这是一篇关于使用 Inno Script 自动安装 .NET Framework 4.0(或任何其他)的帖子.
当您完成此操作后,这也是我设法安装 Sync Framework 的方法,虽然还不是完全自动的,但它至少会在安装您的应用程序时启动安装程序.并且顺利通过设置,我无法自动完成,因为 Sync Framework 安装程序是一个 .MSI
文件.
When you have done that, here is how I managed to install Sync Framework as well, not fully automatic yet but it at least launches the installer when installing your app. and goes trough the setup well, I couldn't get it done automatically because Sync Framework installer is a .MSI
file.
将此添加到文件部分:
[Files]
Source: "C:DIRECTORYHERE\Dependencies\SqlLocalDB.MSI"; DestDir: "{tmp}"; Flags: deleteafterinstall; Permissions: everyone-full; Check: SqlIsNotInstalled; AfterInstall: InstallSql
代码部分(你可以把它放在脚本的底部):
Code section (you can just place this at the bottom of the script):
[Code]
procedure InstallSql;
var
ResultCode: Integer;
StatusText: string;
begin
StatusText := WizardForm.StatusLabel.Caption;
WizardForm.StatusLabel.Caption := 'Installing Microsoft SQL Local Database...';
if not ShellExec('',ExpandConstant('{tmp}\SqlLocalDB.MSI'), '', '', SW_SHOW, ewWaitUntilTerminated, ResultCode) then
begin
MsgBox('SQL local DB failed with code: ' + IntToStr(ResultCode) + '.',
mbError, MB_OK);
WizardForm.StatusLabel.Caption := StatusText;
end;
end;
并检查它是否已经安装:
And check if it is installed already or not:
[code]
function SqlIsNotInstalled: Boolean;
begin
Result := not RegKeyExists(HKEY_LOCAL_MACHINE, 'SOFTWARE\Microsoft\Microsoft SQL Server Local DB\Installed Versions\11.0');
end;
这篇关于微软同步数据服务器版本 2.0.0.0 安装在全局程序集缓存中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!