none
How to add Microsoft Sync Framework to Prerequisites Dialog Box RRS feed

  • Question

  • Hello everyone.

    I created a setup project in Visual Studio 2008 and I need to add microsoft sync framework as a prerequisite. But microsoft sync framework option is not in the Prerequisites Dialog Box. How can I add microsoft sync framework as a prerequisite to my project?
    Sunday, January 11, 2009 3:40 PM

Answers

All replies

  • Hello again. I found the solution. By the help of the bootstrapper manifest generator, you can easily add setup files to your prerequisites dialog.

    You can download the bmg from this link:

    http://code.msdn.microsoft.com/bmg

    A detailed information about how to use bootstrapper manifest generator is found in this link:

    http://www.codeproject.com/KB/aspnet/Add_Custom_Prerequisite.aspx

    • Marked as answer by YiChun Chen Monday, January 12, 2009 8:00 AM
    Sunday, January 11, 2009 5:49 PM
  • Hi Ege,

    You did a great job. I'm glad to hear that you got it working. Thank you for sharing your experience here.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Monday, January 12, 2009 8:05 AM
  • Thank you very much YiChun. I would like to share my experiences here.
    Monday, January 12, 2009 8:54 PM
  • Thanks Ege Ilicak,

    Excellent post.

    Thursday, June 3, 2010 9:06 AM
  • You are welcome. Thank you.
    Thursday, June 3, 2010 12:10 PM
  • I have the same need, and tried this BMG but got NullRerefence errors and "Attempted to access a path that is not on the disk." validation errors. I suspect it is because I'm on a x64 machine and it didn't handle x64 paths correctly. I realize that this BMG software was written a few years ago. At any rate, the end result is that I cannot get it to build a manifest for me, nor show up in the Prerequisites dialog in MSVS 2008.

    Also, this is technically a workaround and not an official solution. In light of that, does anyone know of an official solution for this scenario?

     


    Timex
    Thursday, September 2, 2010 8:39 PM
  • I have figured out the general process of adding supplemental bootstrap packages to the Visual Studio environment. Microsoft Visual Studio 2008 references all of its bootstrap packages in the following directory:

     

    • 32-bit computer: %PROGRAMFILES%\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages
    • 64-bit computer: %PROGRAMFILES(X86)%\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages

     

    This is indicated on the download site for the Microsoft Sync Framework 2.0 Redistributable Package:

    http://www.microsoft.com/downloads/details.aspx?FamilyID=109db36e-cdd0-4514-9fb5-b77d9cea37f6&displaylang=en

    So for bootstrap packages that you want to have available in your Prerequisites dialog need to be downloaded and extracted there. For example, the Microsoft download site for Microsoft Sync Framework 2.0 also published a bootstrap package in a ZIP archive that one can extract to your Visual Studio packages directory (which BTW, is actually the Windows SDK directory, which Visual Studio installs, as the paths indicate). It should extract three separate bootstraps:

    • SyncFX20Core(x86)
    • SyncFX20DatabaseProviders(x86)
    • SyncFX20ProviderServices(x86)

    The same process, of course, should apply to any package you wish to reference in your install prerequisites.

    However, there is a gotcha: The "Bootstrapper package" as published for Microsoft Sync Framework 2.0 does NOT also contain the actual MSI packages; you must download them separately. Additionally, you must manually copy them into each bootstrapper directory. For example, after extracting the bootstrapper package into my Visual Sutdio 2008 directory, I had the following structure:

     

    C:\Program Files (x86)\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages\SyncFX20Core(x86)
    + de
    + en
     package.xml
     synchronizationeula_english.rtf
     <no msi file - must add manually>
    + es
    + fr
    + it
    + ja
    + ko
    + pt
    + ru
    + zh-chs
    + zh-cht
    product.xml
    Thus, after downloading and manually copying the MSI, I have:
    C:\Program Files (x86)\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages\SyncFX20Core(x86)
    + de
    + en
     package.xml
     synchronizationeula_english.rtf
     Synchronization-v2.0-x86-ENU.msi
    + es
    + fr
    + it
    + ja
    + ko
    + pt
    + ru
    + zh-chs
    + zh-cht
    product.xml

    NOTE: If you do not do this, your setup project will fail and give the following error message:

    ERROR: The install location for prerequisites has not been set to 'component vendor's web site' and the file 'SyncFX20Core(x86)\synchronization-v2.0-x86-enu.msi' in item 'SyncFX20Core (x86)' can not be located on disk. See Help for more information.

    Regardless, even after placing the MSI in the boostrapper package directory, I get the following warning after a build:

    WARNING: No 'HomeSite' attribute has been provided for 'SyncFX20Core (x86)', so the package will be published to the same location as the bootstrapper.

    From what I gather, the published boostrapper package for Microsoft Sync Framework 2.0 does not provide the home site URL in the package.xml HomeSite attribute. This is another gotcha, but is only important if one chooses the [default] 'component vendor's web site' option and does not deploy the MSI packages. (Someone correct me if I'm wrong, but it appears the resulting setup will first look locally for the MSI, then hit the URL site if no local package is found.) Therefore, if you choose to not deploy the MSI packages, you must add the HomeSite attribute with the URL.

    Here is an example:

    <?xml version="1.0" encoding="utf-8" ?> 
     <Package Name="DisplayName" LicenseAgreement="synchronizationeula_english.rtf" Culture="Culture" xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper">
     <PackageFiles CopyAllPackageFiles="false">
     <PackageFile Name="synchronizationeula_english.rtf" /> 
     <PackageFile Name="synchronization-v2.0-x86-enu.msi" HomeSite="http://www.microsoft.com/downloads/details.aspx?FamilyID=109db36e-cdd0-4514-9fb5-b77d9cea37f6&amp;displaylang=en" PublicKey="3082010A0282010100BD72B489E71C9F85C774B8605C03363D9CFD997A9A294622B0A78753EDEE463AC75B050B57A8B7CA05CCD34C77477085B3E5CBDF67E7A3FD742793679FD78A034430C6F7C9BAC93A1D0856444F17080DF9B41968AA241CFB055785E9C54E072137A7EBCE2C2FB642CD2105A7D6E6D32857C71B7ACE293607CD9E55CCBBF122EBA823A40D29C2FBD0C35A3E633DC72C490B7B7985F088EF71BD435AE3A3B30DF355FB25E0E220D3E79A5E94A5332D287F571B556A0C3244EF666C6FF0389CEF02AD9AA1DD9807100E3C1869E2794E4614E0B98CD0756D9CAC009C2D42F551B85AF4784583E92E7C2BBB5DCD196128AD94430AC56A42FFB532AEA42922DE16E8D30203010001" /> 
     </PackageFiles>
     <Commands Reboot="Defer">
     <Command PackageFile="synchronization-v2.0-x86-enu.msi" Arguments="/quiet" EstimatedInstallSeconds="80" EstimatedTempBytes="20000000">
     <ExitCodes>
     <ExitCode Value="0" Result="Success" /> 
     <ExitCode Value="112" Result="Fail" String="DiskFull" /> 
     <DefaultExitCode Result="Fail" String="Anunexpectedexitcodewasr" FormatMessageFromSystem="true" /> 
     </ExitCodes>
     </Command>
     </Commands>
     <Strings>
     <String Name="Culture">en</String> 
     <String Name="DisplayName">SyncFX20Core (x86)</String> 
     <String Name="DiskFull">DiskFull</String> 
     <String Name="Anunexpectedexitcodewasr">An unexpected exit code was returned from the installer. The installation failed.</String> 
     </Strings>
     </Package>

    EDIT: I also found another way of specifying the URL in the package.xml, as the way the NETFX package does it. They specify the URL in the CDATA of a "String" tag, apply Name attribute on the String element, then reference the Name in the HomeSite attribute like this:

     

    <?xml version="1.0" encoding="utf-8" ?> 
     <Package Name="DisplayName" LicenseAgreement="synchronizationeula_english.rtf" Culture="Culture" xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper">
     <PackageFiles CopyAllPackageFiles="false">
     <PackageFile Name="synchronizationeula_english.rtf" /> 
     <PackageFile Name="synchronization-v2.0-x86-enu.msi" HomeSite="SyncFX20CoreX86HomeSite" PublicKey="3082010A0282010100BD72B489E71C9F85C774B8605C03363D9CFD997A9A294622B0A78753EDEE463AC75B050B57A8B7CA05CCD34C77477085B3E5CBDF67E7A3FD742793679FD78A034430C6F7C9BAC93A1D0856444F17080DF9B41968AA241CFB055785E9C54E072137A7EBCE2C2FB642CD2105A7D6E6D32857C71B7ACE293607CD9E55CCBBF122EBA823A40D29C2FBD0C35A3E633DC72C490B7B7985F088EF71BD435AE3A3B30DF355FB25E0E220D3E79A5E94A5332D287F571B556A0C3244EF666C6FF0389CEF02AD9AA1DD9807100E3C1869E2794E4614E0B98CD0756D9CAC009C2D42F551B85AF4784583E92E7C2BBB5DCD196128AD94430AC56A42FFB532AEA42922DE16E8D30203010001" /> 
     </PackageFiles>
     <Commands Reboot="Defer">
     <Command PackageFile="synchronization-v2.0-x86-enu.msi" Arguments="/quiet" EstimatedInstallSeconds="80" EstimatedTempBytes="20000000">
     <ExitCodes>
     <ExitCode Value="0" Result="Success" /> 
     <ExitCode Value="112" Result="Fail" String="DiskFull" /> 
     <DefaultExitCode Result="Fail" String="Anunexpectedexitcodewasr" FormatMessageFromSystem="true" /> 
     </ExitCodes>
     </Command>
     </Commands>
     <Strings>
     <String Name="Culture">en</String> 
     <String Name="DisplayName">SyncFX20Core (x86)</String> 
     <String Name="DiskFull">DiskFull</String> 
     <String Name="Anunexpectedexitcodewasr">An unexpected exit code was returned from the installer. The installation failed.</String> 
     <String Name="SyncFX20CoreX86HomeSite">http://www.microsoft.com/downloads/details.aspx?FamilyID=109db36e-cdd0-4514-9fb5-b77d9cea37f6&amp;displaylang=en</String>
     </Strings>
     </Package>

     

    I wish I knew the http://go.microsoft.com/fwlink LinkId for Microsoft Sync Framework 2.0 (x86) ENU. :( If anyone could reply with the LinkId for this component or how to obtain it, this would be very helpful! [1] Most of us probably don't want a long XML-escaped URL in the HomeSite attribute and [2] the unspoken standard/convention is using the shorter go.microsoft.com URLs.

    Hopefully this helps a few out there, if nothing more than a FYI or reference.


    Timex
    • Edited by T1mex Friday, September 3, 2010 3:05 AM Corrected ill-formatted markup
    Friday, September 3, 2010 2:46 AM
  • hi Timex,

    I am facing the same error did u find any solution? 

    Thanks


    lavanyar
    Sunday, December 12, 2010 6:58 PM
  • hi Timex,

    I am facing the same error did u find any solution? 

    Thanks


    lavanyar
    Sunday, December 12, 2010 6:58 PM