如何解决Rider docker调试问题 [英] How to solve rider docker debugging issue
问题描述
所以我有一个.net core 3.1 Web API项目,该项目是我在Visual Studio上开发的。我现在已切换到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"]
在骑手:
推荐答案
您好,您问我是否可以共享我的Run / Debug配置上个月。我今天才看到消息。
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屋!