none
ClickOnce installation failure: SqlLocalDB2012\x64\sqlcmdInutils.msi has changed since it was initially published RRS feed

  • Question

  • I have a VS2017 project that I am publishing with ClickOnce.  Prerequisites include SQLLocalDB2012.  All previous versions have published successfully, and users have been able to download and install the application.

    New users are now, however, receiving an error message that is stopping the download of both SqlLocalDB2012 and the application:

    The install log file contains the same error message, but no other information.

    These two postings here and here suggest that the problem is related to the public key on the ClickOnce Bootstrapper file, product.xml, not matching the product key of the setup.exe installer.  I accordingly amended product.xml by replacing its product keys for all SqlLocalDB2012 elements to match the setup.exe product key and re-published, but this has not solved the problem.

    I have also tried installing SqlLocalDB2012 manually first, but when I then try to download the application, it does not recognise that SqlLocalDB is already installed and still tries to run sqlcmdInutils.msi, leading to the same failure.

    I cannot understand why, after two years of successfully publishing a number of versions of this application, I am now getting this error.  I have made no changes to other prerequisites or the manner or destination (my website) of publication and have simply incremented the version number on each occasion. 

    Can you help?

    Problem solved - see further post below


    Mike Whalley


    Sunday, January 19, 2020 2:00 PM

Answers

  • Problem solved eventually as I decided to add the prerequisite software into my application, rather than downloading from the component vendor's website. Microsoft's guidance on how to do this is here:

    https://docs.microsoft.com/en-us/visualstudio/deployment/how-to-include-prerequisites-with-a-clickonce-application?view=vs-2015&redirectedfrom=MSDN

    Note that:

    (1) for Windows10, you will find the SqlLocalDB packages folder in C:\Program Files (x86)\Microsoft SDKs\ClickOnce Bootstrapper\Packages.

    (2) For SqlLocalDB, you need to include both x64 (Windows 64 bit) and x86 (Windows 32 bit) versions, and will need to create x64 and x86 folders within your ClickOnce Bootstrap\Packages\SqlLocalDB2012 folder to hold the installation files.

    (3) You cannot have some prerequisites loaded from an external source and some from the application - it's all or nothing. So you may need to repeat the exercise for other prerequisites, e.g. .Net.

    I hope this is helpful to others.


    Mike Whalley

    • Marked as answer by Mike Whalley Monday, January 20, 2020 3:17 PM
    Monday, January 20, 2020 3:17 PM

All replies

  • Hi Mike Whalley,

    Welcome to MSDN forum. 

    According to your description, it might be caused by the conflicts from the old files,you could have a try to clear the temp files in this path which is shown in error window, then re-run this setup file. 

    BTW, you could also redirect to stack overflow with clickonce tag for better support.

    Any feedback will be expected.

    Best Regards,

    Dylan


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com


    Monday, January 20, 2020 5:57 AM
  • No, that has not fixed the problem.  I was hoping for something more technical as a solution.  First, it doesn't explain why the error arises on the first attempt to install, when there are no conflicting existing VS temp files and, secondly, I need a solution at the publish end, not the user end, if my application is to be globally accessible and not require individual user 'fixes'.

    There is a Microsoft note on the problem here, but it suggests that the problem was fixed for all versions of VS after VS2012.  Its remedy was to ensure that the .msi file is 'signed' but as the .msi file is downloaded from Microsoft on each install, it is difficult to see how I can have any control over this, other than by setting the public key in the product.xml file (already tried as noted).  Can you give any further guidance?

    Many thanks


    Mike Whalley

    Monday, January 20, 2020 10:18 AM
  • Problem solved eventually as I decided to add the prerequisite software into my application, rather than downloading from the component vendor's website. Microsoft's guidance on how to do this is here:

    https://docs.microsoft.com/en-us/visualstudio/deployment/how-to-include-prerequisites-with-a-clickonce-application?view=vs-2015&redirectedfrom=MSDN

    Note that:

    (1) for Windows10, you will find the SqlLocalDB packages folder in C:\Program Files (x86)\Microsoft SDKs\ClickOnce Bootstrapper\Packages.

    (2) For SqlLocalDB, you need to include both x64 (Windows 64 bit) and x86 (Windows 32 bit) versions, and will need to create x64 and x86 folders within your ClickOnce Bootstrap\Packages\SqlLocalDB2012 folder to hold the installation files.

    (3) You cannot have some prerequisites loaded from an external source and some from the application - it's all or nothing. So you may need to repeat the exercise for other prerequisites, e.g. .Net.

    I hope this is helpful to others.


    Mike Whalley

    • Marked as answer by Mike Whalley Monday, January 20, 2020 3:17 PM
    Monday, January 20, 2020 3:17 PM