![](/img/trans.png)
[英]Azure function v4 migration. Could not load file or assembly 'Microsoft.Extensions.Configuration.Abstractions, Version=7.0.0.0, Culture=neutral
[英]What else can I do when the project "Could not load file or assembly 'Microsoft.Extensions.Logging.Abstractions" except manually empty the bin and obj
我在運行時得到這個:Could not load file or assembly 'Microsoft.Extensions.Logging.Abstractions
我嘗試了 Skorunka František 的以下步驟但沒有成功: 鏈接到 StackOverFlow 帖子
這就是我的 startup.cs 文件在我的項目中的樣子。 它基本上來自 MSDN 文檔: 鏈接在這里
[assembly: FunctionsStartup(typeof(HiQFoodCourt.Functions.StartUp))]
namespace HiQFoodCourt.Functions
{
public class StartUp : FunctionsStartup
{
public override void Configure(IFunctionsHostBuilder builder)
{
string connectionString = "Data Source=(localdb)\\MSSQLLocalDB;Initial Catalog=master;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False";
builder.Services.AddDbContext<ApplicationDbContext>(
options => SqlServerDbContextOptionsExtensions.UseSqlServer(options, connectionString));
var mapperConfig = new MapperConfiguration(x =>
{
x.AddProfile(new MappingProfile());
});
IMapper mapper = mapperConfig.CreateMapper();
builder.Services.AddSingleton(mapper);
}
}
}
我對如何解決和處理這個問題一無所知。 下面是它在 Visual Studio 中的外觀:
我嘗試了 Skorunka František 的以下步驟但沒有成功: 鏈接到 StackOverFlow 帖子
我以前遇到過同樣的問題和我找到的解決方案
那還是不行
希望這對你有幫助!
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.