microsoft synchronization data server version 2.0.0.0 to be installed in Global Assembly cache

我只是一个虾纸丫 提交于 2020-01-06 03:15:06

问题


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

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


回答1:


You have to install Sync Framework on your clients PC. Maybe some other Sql frameworks as well.

This page says:

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.

Download link

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).

Here is a post about getting .NET framework 4.0 (or any other) installed automatically with Inno Script.

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.

Add this to file section:

[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;


来源:https://stackoverflow.com/questions/27647064/microsoft-synchronization-data-server-version-2-0-0-0-to-be-installed-in-global

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!