C# 将ASP.Net核心程序集动态加载到常规.Net核心程序集中
我有一个针对ASP.Net Core 3.1的项目,例如:C# 将ASP.Net核心程序集动态加载到常规.Net核心程序集中,c#,asp.net-core,.net-core,C#,Asp.net Core,.net Core,我有一个针对ASP.Net Core 3.1的项目,例如: <Project Sdk="Microsoft.NET.Sdk.Web"> 这在第二行失败,但出现以下异常: System.IO.FileNotFoundException: 'Could not load file or assembly 'Microsoft.AspNetCore.Mvc.Core, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829d
<Project Sdk="Microsoft.NET.Sdk.Web">
这在第二行失败,但出现以下异常:
System.IO.FileNotFoundException: 'Could not load file or assembly 'Microsoft.AspNetCore.Mvc.Core, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified.'
我不记得加载的程序集引用普通程序集时曾出现过此问题,但由于某些原因,它在ASP中失败。如果执行加载的项目具有对ASP.NETCore的框架引用,则此操作将成功
如何将ASP.Net核心程序集加载到常规的.Net核心程序集中
System.IO.FileNotFoundException: 'Could not load file or assembly 'Microsoft.AspNetCore.Mvc.Core, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified.'