1

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 Answers1

3

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;
Community
  • 1
  • 1
CularBytes
  • 9,924
  • 8
  • 76
  • 101
  • Actually what I did just now was I changed the setting of the files within the application files from prerequest(auto) to include and it worked, would it cause any problems in the future or it would work normally now? – amateur programmer Dec 25 '14 at 12:27
  • O well if it is that easy then skip that thread of mine, for me I couldn't choose it from the list of Prerequisites. I think it won't have any problems in the future but I advice you use other software to make installers, ClickOnce apps are not that ... safe. – CularBytes Dec 25 '14 at 12:30
  • thanks for the instant reply and help, the app is for a single client so, no safety worries should I keep it as it is using the ClickOnce app or make a new installer for it? – amateur programmer Dec 25 '14 at 12:33
  • 1
    Just looks more professional, no problem for keeping it as a ClickOnce app in that case. – CularBytes Dec 25 '14 at 21:21