【发布时间】:2021-03-19 17:21:42
【问题描述】:
我有一段时间没有运行的项目,使用 dotnet core 1.1.2 依赖项构建。
与此同时,我更新了 Visual Studio,可能为 2.0 安装了一些 dotnet 核心的东西,我的应用程序不再运行。
InvalidOperationException: Can not find assembly file Microsoft.CSharp.dll at 'C:\dev\EarthML\EarthML.Mapify\src\EarthML.Mapify.Portal\bin\Debug\net462\win10-x64\refs,C:\dev\EarthML\EarthML.Mapify\src\EarthML.Mapify.Portal\bin\Debug\net462\win10-x64\'
Microsoft.Extensions.DependencyModel.Resolution.AppBaseCompilationAssemblyResolver.TryResolveAssemblyPaths(CompilationLibrary library, List<string> assemblies)
我该怎么做才能开始弄清楚它为什么不起作用?
【问题讨论】:
-
根据您的例外情况,它注意到
net462\win10-x64。我高度怀疑您的.csproj文件需要审查。如果你不介意分享一下? -
我将应用程序升级到 dotnet core 2.0 和 razor pages 并解决了这个问题。
-
您的程序集路径似乎缺少 GAC。