Vs 代码 docker 扩展不会看到安装的 c# 扩展

时间:2021-04-11 16:57:41

标签: c# docker visual-studio-code

我正在尝试使我的 ASP.NET Core 应用程序与 docker 容器一起工作,因此我尝试使用 命令托盘添加 dockerfile 或 docker-compose 文件在 vs 代码中通过 Docker 扩展生成 docker 文件 - 很糟糕,我收到错误 Cannot generate Dockerfiles for a .NET project unless version 1.23.9 or higher of the C# extension is installed. - 即使我已经安装了它并尝试了一些方法来修复它(比如重新安装扩展、vs 代码应用程序和在别处搜索答案)。我正在使用 Windows,并且在尝试脚手架操作时安装并运行了 docker。

Here are screenshot where you can see I am, in fact, have these extensions installed.

1 个答案:

答案 0 :(得分:2)

我遇到了同样的问题,通过将 C# 扩展降级到 1.23.9 并重新启动 VS Code 解决了这个问题。

VS Code Extensions