【问题标题】:Cannot debug locally in Visual Studio with Docker support and Visual Studio provided SQL Server无法在具有 Docker 支持和 Visual Studio 提供的 SQL Server 的 Visual Studio 中进行本地调试
【发布时间】:2021-09-24 20:39:09
【问题描述】:

我有一个使用 Entity Framework 的 ASP.NET 5.0 Web API 来访问 SQL Server。 从 Visual Studio 运行 (F5) 可以正常工作。连接字符串为Server=(localDB)\\MSSQLLocalDB;Database=***;Integrated Security=true

然后我添加 docker 支持。现在,如果我使用 Docker 配置文件调试应用程序,我会得到一个 System.PlatformNotSupportedException: LocalDB is not supported on this platform.

我应该怎么做才能让它工作?

【问题讨论】:

标签: asp.net sql-server docker localdb


【解决方案1】:

LocalDB 需要命名管道,这在您的 docker (Linux) 环境中不可用。请改用 SQL Server Express,并记住为远程连接启用 TCP/IP 协议。

【讨论】:

    猜你喜欢
    • 2017-08-22
    • 1970-01-01
    • 1970-01-01
    • 2010-12-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-05-21
    • 1970-01-01
    相关资源
    最近更新 更多