How to install SQL 2019 Express as a prerequisite in VS 2019 Deployment Project

Al Walton 25 Reputation points
2023-03-06T13:42:22.7233333+00:00

So, I've had VS 2019 Pro for time now and it appears that SQL 2019 Express (NOT LOCALDB) is still not available as an Deployment Project Prerequisite. My Solution is trying, and has installed SQL 2012 Express, but this version is no longer available.

I really don't want to force my end users to have to install SQL 2019 Express manually. When, oh when, is Microsoft going to provide an Extension for Deployment Projects to include SQL 2019 Express as an Prerequisite?

User's image

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,888 questions
{count} vote

Accepted answer
  1. Tianyu Sun-MSFT 29,446 Reputation points Microsoft Vendor
    2023-03-07T09:55:06.3266667+00:00

    Hello @Al Walton

    Welcome to Microsoft Q&A forum.

    The SQL 2019 Express isn’t listed in the Prerequisites dialog by default, you may need to manually add it to the Prerequisites dialog. See this document: Walkthrough: Creating a Custom Bootstrapper to Show a Privacy Prompt for a simple sample.

    The steps to add custom prerequisites is like following(a simple example):

    1. Navigate to this folder: C:\Program Files (x86)\Microsoft SDKs\ClickOnce Bootstrapper\Packages.
    2. Create a new folder and name it for example A in above directory.
    3. Open A and create a file, name it product.xml. Create a folder in A, name it en. Put the setup file(for example SQL2019-SSEI-Expr.exe) of SQL 2019 Express into A. Open en, and create a file, name it package.xml.
    4. Open product.xml file and input following code: 
    <?xml version="1.0" encoding="utf-8" ?>  
    <Product  
      xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper"  
      ProductCode="XXXXXXXX">  
      <!-- Defines the list of files to be copied on build. -->  
      <PackageFiles CopyAllPackageFiles="false">  
        <PackageFile Name="SQL2019-SSEI-Expr.exe" />  
      </PackageFiles>  
    
      <!-- Defines how to run the Setup package.-->  
      <Commands >  
        <Command PackageFile = "SQL2019-SSEI-Expr.exe">  
        </Command>  
      </Commands>  
    
    </Product>
    
    1. Open package.xml file and input following code: 
    <?xml version="1.0" encoding="utf-8" ?>  
    <Package   
      xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper"  
      Name="DisplayName"  
      Culture="Culture">  
    
      <!-- Defines a localizable string table for error messages. -->  
      <Strings>  
        <String Name="DisplayName">SQL 2019 Express</String>  
        <String Name="Culture">en</String> 
      </Strings>  
    </Package>
    
    1. Check in Prerequisites dialog and confirm if you can select the newly added SQL 2019 Express.

    Please feel free to let us know if it works.

    Sincerely,

    Tianyu


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Manoj Kumar Sharma 0 Reputation points
    2023-03-06T14:10:44.6866667+00:00

    You can install the desired SQL EXPRESS edition from the Web Platform Installer

    It was retired on 31-DEC-2022. It was earlier available for download at https://www.microsoft.com/web/downloads/platform.aspx

    However, since it no longer available as part of Microsoft Downloads, you can install it directly from a GitHub repo. Check out https://github.com/MicrosoftDocs/iis-docs/blob/main/iis/install/web-platform-installer/web-platform-installer-direct-downloads.md

    Hope this helps.

    Manoj Kumar Sharma