Virtual Happy Hour this month, Jun 28, we'll be getting a sneak preview at our soon to launch SaaS CMS!

Try our conversational search powered by Generative AI!

LocalDB is not supported on this platform


I'm new to development on Optimizely CMS and I use macOS. We are currently in the middle of migration from CMS v11 to v12. The new dev environment is using docker and until a few days ago there was no issue in compatibility and no limitations. Now I'm not able to run the project as I get the PlatformNotSupportedException "LocalDB is not supported on this platform". Yet our partners who are technical responsible for this platform, have not made any changes to the database or setup

I get that SQL Server LocalDB is a feature of SQL Server, which is Windows only, that's the solution is containerized which should avoid that issue, and did until now. 

My question is if anyone can think of or know reason why this suddenly could be a problem when it has worked fine until now.

Any help/comment/suggestion is highly appreciated


Mar 15, 2023 7:51

What does the connection string look like in appSettings.json or appSettings.development.json 

Could what you have here be overriding your env variables ?

Edited, Mar 15, 2023 9:16

I already checked if that was the case and no connetionstrings in those files. My ConnectionStrings secrets.json look like his: 

"ConnectionStrings:EPiServerDB": "Server=localhost; Database=cmsDb;User Id=sa;Password=Passw0rd!;MultipleActiveResultSets=True;TrustServerCertificate=True"
Mar 15, 2023 9:45

You got a M1 or similar ARM-based mac?

Mar 15, 2023 13:06

It's an ARM based Mac 

Mar 15, 2023 13:12

Which images/frameworks do you load into the docker container?

Mar 15, 2023 13:19

SQL Server

Mar 15, 2023 19:02
Eric Herlitz - Mar 15, 2023 19:40
Care to post the dockerfile?
Enock - Mar 16, 2023 8:39
FROM AS base


USER root

COPY ./Docker/ .
RUN chmod +x /src/

USER mssql


ENTRYPOINT /src/ & /opt/mssql/bin/sqlservr
Eric Herlitz - Mar 16, 2023 9:22
That SQL sever won't probably work on an ARM mac. Instead use
Enock - Mar 16, 2023 9:38
What puzzles me is that it has worked before. But what you are saying is also what I have read on my google searches. However it is not possible to change it at this point
Eric Herlitz - Mar 16, 2023 9:52
Maybe it works through emulation, that can however have changed.
Enock - Mar 16, 2023 10:08
Yes that is what I was afraid of.
Enock - Mar 16, 2023 10:15
As mentioned, my ConnectionStrings looks like this "ConnectionStrings:EPiServerDB": "Server=localhost; Database=cmsDb;User Id=sa;Password=Passw0rd!;MultipleActiveResultSets=True;TrustServerCertificate=True" in my user secrets, and through debugging I can see it somehow gets overwritten and then looks like this ""Data Source=(localdb)\\mssqllocaldb;Initial Catalog=EPiServerDB;Integrated Security=True;MultipleActiveResultSets=True"

Any idea how that can be overwritten or where?
Eric Herlitz - Mar 16, 2023 10:55
Either you modify it in appsettings.Development.json or via some injected class, Alloy used to have one of those. Search your code and you'll find it.

Closing this as I found the cause of the error. Somehow EF created it's own instance of a localdb which caused it to overlook the fact that there was a local connctionstring

Mar 30, 2023 7:34
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.