.net 核心发布时找不到程序集文件 Microsoft.DotNet.Cli.Utils.dll 错误

Can not find assembly file Microsoft.DotNet.Cli.Utils.dll error on .net core publish

我可以在 IISExpress 中成功 运行 本地项目。但是,当我尝试将项目发布到 IIS 服务器时,这是我收到的错误消息。

错误:找不到程序集文件Microsoft.DotNet.Cli.Utils.dll ...

任何人都可以指出正确的解决方案方向吗?
这是我的 project.json 文件。

{
"dependencies": {
"Microsoft.ApplicationInsights.AspNetCore": "1.0.0",
"Microsoft.AspNetCore.Diagnostics": "1.0.0",
"Microsoft.AspNetCore.Mvc": "1.0.0",
"Microsoft.AspNetCore.Razor.Tools": {
  "version": "1.0.0-preview2-final",
  "type": "build"
},
"Microsoft.AspNetCore.Server.IISIntegration": "1.0.0",
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0",
"Microsoft.AspNetCore.StaticFiles": "1.0.0",
"Microsoft.Extensions.Options.ConfigurationExtensions": "1.0.0",
"Microsoft.Extensions.Configuration.Binder": "1.0.0",
"Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0",
"Microsoft.Extensions.Configuration.Json": "1.0.0",
"Microsoft.Extensions.Logging": "1.0.0",
"Microsoft.Extensions.Logging.Console": "1.0.0",
"Microsoft.Extensions.Logging.Debug": "1.0.0",
"Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0",
"Microsoft.AspNet.WebApi.Client": "5.2.3",
"EntityFramework": "6.1.3"
},

"tools": {
"Microsoft.AspNetCore.Razor.Tools": {
  "version": "1.0.0-preview1-final",
  "imports": "portable-net45+win8+dnxcore50"
},
"Microsoft.AspNetCore.Server.IISIntegration.Tools": {
  "version": "1.0.0-preview1-final",
  "imports": "portable-net45+win8+dnxcore50"
}
},

"frameworks": {
"net461": {
  "dependencies": {
    "DomainModel": {
      "target": "project"
    },
    "Models": {
      "target": "project"
    }
  }
}
},

"buildOptions": {
"emitEntryPoint": true,
"preserveCompilationContext": true
},

"publishOptions": {
"include": [
  "wwwroot",
  "Views",
  "appsettings.json",
  "web.config"
]
},

"scripts": {
"prepublish": [ "npm install", "bower install", "gulp clean", "gulp min" ],
"postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% -   -framework %publish:FullTargetFramework%" ]
}
}

我已经通过 post 中的解决方法解决了我的问题。看起来这是 Entity Framework 的问题,并且使用与 .netcore1 兼容的正确版本。

Work Around Solution

你看过文件中的版本了吗global.json? 我进入了“1.0.0-preview 2-003121”版本并为我解决了这个问题。