gpt4 book ai didi

c# - 无法加载文件或程序集 'Microsoft.Framework.Logging.ILoggerFactory' 或其依赖项之一

转载 作者:太空宇宙 更新时间:2023-11-03 13:07:10 27 4
gpt4 key购买 nike

在我新的 asp.net 5 应用程序中,我有这个错误:

Could not load file or assembly 'Microsoft.Framework.Logging.ILoggerFactory' or one of its dependencies. The system cannot find the file specified

System.IO.FileNotFoundException Could not load file or assembly 'Microsoft.Framework.Logging.ILoggerFactory, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.

但是我已经在 project.json 中添加了引用

{
/* Click to learn more about project.json http://go.microsoft.com/fwlink/?LinkID=517074 */
"webroot": "wwwroot",
"version": "1.0.0-*",
"dependencies": {
"EntityFramework.SqlServer": "7.0.0-beta4",
"EntityFramework.Commands": "7.0.0-beta4",
"Microsoft.AspNet.Mvc": "6.0.0-beta4",
"Microsoft.AspNet.Mvc.TagHelpers": "6.0.0-beta4",
"Microsoft.AspNet.Authentication.Cookies": "1.0.0-beta4",
"Microsoft.AspNet.Authentication.Facebook": "1.0.0-beta4",
"Microsoft.AspNet.Authentication.Google": "1.0.0-beta4",
"Microsoft.AspNet.Authentication.MicrosoftAccount": "1.0.0-beta4",
"Microsoft.AspNet.Authentication.Twitter": "1.0.0-beta4",
"Microsoft.AspNet.Diagnostics": "1.0.0-beta4",
"Microsoft.AspNet.Diagnostics.Entity": "7.0.0-beta4",
"Microsoft.AspNet.Identity.EntityFramework": "3.0.0-beta4",
"Microsoft.AspNet.Server.IIS": "1.0.0-beta4",
"Microsoft.AspNet.Server.WebListener": "1.0.0-beta4",
"Microsoft.AspNet.StaticFiles": "1.0.0-beta4",
"Microsoft.AspNet.Tooling.Razor": "1.0.0-beta4",
"Microsoft.Framework.ConfigurationModel.Json": "1.0.0-beta4",
"Microsoft.Framework.ConfigurationModel.UserSecrets": "1.0.0-beta4",
"Microsoft.Framework.CodeGenerators.Mvc": "1.0.0-beta4",
"Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0-beta4",
"Microsoft.AspNet.Security.OpenIdConnect": "1.0.0-beta3",
"Microsoft.Owin.Security.Cookies": "3.0.1",
"Microsoft.Framework.Logging.Console": "1.0.0-beta4"
},
"commands": {
/* Change the port number when you are self hosting this application */
"web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --server.urls http://localhost:5000",
"gen": "Microsoft.Framework.CodeGeneration",
"ef": "EntityFramework.Commands"
},
"frameworks": {
"dnx451": { }
},
"exclude": [
"wwwroot",
"node_modules",
"bower_components"
],
"bundleExclude": [
"node_modules",
"bower_components",
"**.kproj",
"**.user",
"**.vspscc"
],
"scripts": {
"postrestore": [ "npm install" ],
"prepare": [ "grunt bower:install" ]
}
}

我错过了什么?

奇怪的是它会构建!

最佳答案

您应该更新到最新版本(撰写本文时为 Beta 7,尽管 Beta 8 将于下周发布)。 Beta 4 现在有几个版本已经过时并且非常不稳定。

正如@Geerten 所建议的,您还需要添加 Microsoft.Framework.Logging。您可以从官方 announcement 了解有关升级到 Beta 7 的更多信息.请注意,Beta 7 也有新版本的工具,因此您需要安装它。

关于c# - 无法加载文件或程序集 'Microsoft.Framework.Logging.ILoggerFactory' 或其依赖项之一,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30375231/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com