无法加载文件或程序集“Microsoft.Build.Framework&qu

Could not load file or assembly #39;Microsoft.Build.Framework#39;(VS 2017)(无法加载文件或程序集“Microsoft.Build.Framework(VS 2017))
本文介绍了无法加载文件或程序集“Microsoft.Build.Framework"(VS 2017)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试运行命令update-database"时,我得到了这个异常:

When I try running the command "update-database", I get this exception:

指定-Verbose"标志以查看正在应用的 SQL 语句到目标数据库.System.IO.FileNotFoundException:不能加载文件或程序集 'Microsoft.Build.Framework, Version=15.1.0.0,Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' 或其之一依赖关系.该系统找不到指定的文件.文件名:'Microsoft.Build.Framework,版本=15.1.0.0,文化=中性,PublicKeyToken=b03f5f7f11d50a3a'

Specify the '-Verbose' flag to view the SQL statements being applied to the target database. System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Build.Framework, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. File name: 'Microsoft.Build.Framework, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

警告:程序集绑定日志记录已关闭.启用程序集绑定失败记录,设置注册表值[HKLMSoftwareMicrosoftFusion!EnableLog] (DWORD) 为 1.注意:有是与装配绑定失败相关的一些性能损失记录.要关闭此功能,请删除注册表值[HKLMSoftwareMicrosoftFusion!EnableLog].

WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLMSoftwareMicrosoftFusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLMSoftwareMicrosoftFusion!EnableLog].

无法加载文件或程序集Microsoft.Build.Framework,版本=15.1.0.0,文化=中性,PublicKeyToken=b03f5f7f11d50a3a' 或它的依赖项之一.系统找不到指定的文件.`

Could not load file or assembly 'Microsoft.Build.Framework, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.`

推荐答案

我相信我遇到了和你一样的问题.我没有保存整个错误消息,但我的错误消息是

I believe I had the same issue as you did. I didn't save the whole error message, but my error message was

'无法加载文件或程序集'Microsoft.Build.Framework,版本=15.1.0.0,文化=中性,PublicKeyToken=b03f5f7f11d50a3a' 或它的依赖项之一.系统找不到指定的文件.'

我正在使用 Visual Studio 2017 并尝试在 Add-Migration 之后执行 Update-Database.

I am using Visual Studio 2017 and was trying to do Update-Database after Add-Migration.

为了解决这个问题,我关闭了 Visual Studio 并重新打开它,然后再次重新运行 Update-Database.

To resolve the issue I closed Visual Studio and re-opened it, then re-ran Update-Database again.

这可能会也可能不会解决您的问题,但我想我会发布以防万一.

This may or may not resolve your issue, but I thought I'd post just in case it would help.

这篇关于无法加载文件或程序集“Microsoft.Build.Framework"(VS 2017)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

DispatcherQueue null when trying to update Ui property in ViewModel(尝试更新ViewModel中的Ui属性时DispatcherQueue为空)
Drawing over all windows on multiple monitors(在多个监视器上绘制所有窗口)
Programmatically show the desktop(以编程方式显示桌面)
c# Generic Setlt;Tgt; implementation to access objects by type(按类型访问对象的C#泛型集实现)
InvalidOperationException When using Context Injection in ASP.Net Core(在ASP.NET核心中使用上下文注入时发生InvalidOperationException)
LINQ many-to-many relationship, how to write a correct WHERE clause?(LINQ多对多关系,如何写一个正确的WHERE子句?)