如何解决rider docker调试问题 [英] How to solve rider docker debugging issue

查看:51
本文介绍了如何解决rider docker调试问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我有一个在 Visual Studio 上开发的 .net core 3.1 web api 项目.我现在已切换到 Rider,但在尝试调试应用程序时出现错误.我可以运行它构建的应用程序并在本地 docker 容器中正常运行.

So i have a .net core 3.1 web api project which i developed on visual studio. I have now switched to rider and i get an error when trying to debug the application. I can run the app it build and runs fine in a local docker container.

当我按下调试按钮时,出现以下错误:

When i press the debug button i get the following error:

Unhandled Exception:
System.IO.FileNotFoundException: Could not load file or assembly 'JetBrains.Platform.Core, Version=777.0.0.0, Culture=neutral, PublicKeyToken=1010a0d8d6380325' or one of its dependencies.
File name: 'JetBrains.Platform.Core, Version=777.0.0.0, Culture=neutral, PublicKeyToken=1010a0d8d6380325'
[ERROR] FATAL UNHANDLED EXCEPTION: System.IO.FileNotFoundException: Could not load file or assembly 'JetBrains.Platform.Core, Version=777.0.0.0, Culture=neutral, PublicKeyToken=1010a0d8d6380325' or one of its dependencies.
File name: 'JetBrains.Platform.Core, Version=777.0.0.0, Culture=neutral, PublicKeyToken=1010a0d8d6380325'

是什么导致了这个错误,我该如何解决?

附加信息:

Dockerfile:

Dockerfile:

#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.

FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443

FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster AS build
WORKDIR /src
COPY ["Niverobot.WebApi/Niverobot.WebApi.csproj", "Niverobot.WebApi/"]
COPY ["Niverobot.Domain/Niverobot.Domain.csproj", "Niverobot.Domain/"]
RUN dotnet restore "Niverobot.WebApi/Niverobot.WebApi.csproj"
COPY . .
WORKDIR "/src/Niverobot.WebApi"
RUN dotnet build "Niverobot.WebApi.csproj" -c Release -o /app/build

FROM build AS publish
RUN dotnet publish "Niverobot.WebApi.csproj" -c Release -o /app/publish

FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "Niverobot.WebApi.dll"]

在rider中运行配置:

Run config in rider:

推荐答案

你问我是否可以分享我上个月的运行/调试配置.我今天才看到消息.在这里.

Hi you asked if I could share my Run/Debug config last month. I only saw the message today. Here it is.

我不记得除了按照文档进行操作以使其正常工作之外还做了什么.我最近将 Rider 升级到 2020.1,发现这有助于解决我在 Rider 中运行 .NetCore 3.1 时遇到的一些问题.

I don't remember doing anything other than following the docs to get it working. I've recently upgraded Rider to 2020.1 and found that helped with some issues I had running .NetCore 3.1 in Rider.

我的设置和你的设置之间唯一的另一个区别是我使用的是 docker-compose

The only other difference I see between my setup and yours is that I'm using docker-compose

这篇关于如何解决rider docker调试问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆