1
votes

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:Rider run config

2
Also i am running on WindowsLotusin

2 Answers

0
votes

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

0
votes

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

enter image description here

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