Unable to use Microsoft SQL Server Compact 4.0 with Visual Studio 2019 image

Johelvis Guzman's Avatar

Johelvis Guzman

25 Jun, 2021 02:59 PM

Hello,

I seem to be having an issue with Appveyor and using Microsoft SQL Server Compact 4.0 with Visual Studio 2019 image. I've previously used the Visual Studio 2017 image and everything was fine until I switched the image to Visual Studio 2019.

I've added the appveyor.yml configuration file I been using.

Error Message:
System.Data.SqlServerCe.SqlCeException : Unable to load the native components of SQL Server Compact corresponding to the ADO.NET provider of version 8876. Install the correct version of SQL Server Compact. Refer to KB article 974247 for more details.

  1. Support Staff 1 Posted by Feodor Fitsner on 25 Jun, 2021 03:30 PM

    Feodor Fitsner's Avatar

    Can you drop a link to a build please?

  2. 2 Posted by Johelvis Guzman on 25 Jun, 2021 04:13 PM

    Johelvis Guzman's Avatar
  3. Support Staff 3 Posted by Feodor Fitsner on 25 Jun, 2021 08:10 PM

    Feodor Fitsner's Avatar

    I've never worked with SQL Server CE. Is System.Data.SqlServerCe looking for it in GAC? How do you install SQL Server CE while deploying the app to a user?

  4. Support Staff 4 Posted by Feodor Fitsner on 25 Jun, 2021 08:34 PM

    Feodor Fitsner's Avatar

    OK, looks like install SQL Server CE 4.0 does the trick:

    before_build:
      - dotnet --info
      - dotnet restore
      - ps: |
          $exePath = "$env:TEMP\SSCERuntime_x64-ENU.exe"
          (New-Object Net.WebClient).DownloadFile('https://download.microsoft.com/download/F/F/D/FFDF76E3-9E55-41DA-A750-1798B971936C/ENU/SSCERuntime_x64-ENU.exe', $exePath)
          cmd /c start /wait $exePath /i /quiet /qn /norestart
    
  5. 5 Posted by Johelvis Guzman on 26 Jun, 2021 06:08 AM

    Johelvis Guzman's Avatar

    That did the trick. Thank you so much :)

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Already uploaded files

  • appveyor.yml 1.61 KB

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac