所以我有一个在Visual Studio上开发的.net core 3.1 Web api项目。我现在已切换到rider,尝试调试应用程序时出现错误。我可以运行它构建的应用程序,并在本地Docker容器中正常运行。
当我按下调试按钮时,出现以下错误:
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:
#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"]