visual-studio - Visual Studio 在第一次运行时查找较旧的程序集版本
问题描述
Visual Studio 专业版 2017 版本 15.7.4
我有一个 Web 项目 (MVC),每当我从 Visual Studio 运行它时,它都会打开浏览器(我已经在 Chrome 和 IE 中复制了它)并显示以下错误:
Could not load file or assembly 'Microsoft.Owin, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
但是,如果我刷新浏览器,它会继续并按预期工作。从技术上讲,我可以解决它,但它已经变得烦人且耗时。我不知道发生了什么。
我已经尝试重新启动 VS 和 Windows(服务器 2012 r2),检查了 GAC(什么也没找到),我检查了我的项目中对 Owin 的所有引用,我没有看到任何引用 v2.1,我什至有一个绑定重定向我的 web.config
<dependentAssembly>
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
</dependentAssembly>
我主要研究了如何修复我得到的那种错误异常,但我没有发现任何类似的东西,我猜在 VS 中有某种缓存或默认选项试图寻找旧版本第一次运行,但我不知道在哪里寻找它。
有任何想法吗?
解决方案
推荐阅读
- webpack - Webpack4 + babel8 + coreJs@3 下的 CommonJs 出现奇怪错误
- java - 如果匹配,则将 ArrayList_A 的元素添加到 ArrayList ,如果不匹配,则将 ArrayList_B 的元素添加到 ArrayList
- java - Apache Camel:使用 SFTP 组件一次下载多个文件
- javascript - 在cakephp中使用javascript隐藏下拉字段
- c++ - 在类中初始化 NTL 向量时出错
- css - 如何在本机反应中计算()高度以进行样式设置
- typescript - 如何在 TypeScript 中省略字符串文字中的字符串
- shopify - 如何在 Shopify Liquid 中满足条件时创建变量和更新
- flutter - 如何缓存 FadeInImage.assetNetwork 获取的图像
- ruby-on-rails - 如何填充 s3 生产桶?rails app + heroku + 活动记录