How to solve rider docker debugging issue

我的未来我决定 提交于 2020-06-13 08:32:08

问题


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'

What causes this error and how can i solve it?

Additional info:

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 config in rider:


回答1:


I read in the docs of rider that it does not support docker debugging on windows yet.




回答2:


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

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.

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



来源:https://stackoverflow.com/questions/60886210/how-to-solve-rider-docker-debugging-issue

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!