c# - 无法加载文件或程序集 Microsoft.Owin 3.0.0 到 3.0.1

标签 c# .net azure

有趣的依赖问题...

VS2015.3、.NET45 将 Microsoft.Owin 从 3.0.0 更新到 3.0.1(跟踪此更新是问题所在 - 想要安装 https://www.nuget.org/packages/IdentityServer3.AccessTokenValidation/)

enter image description here 它在 IIS Express 上本地运行

但发布到 Azure 网站:(我直接从 VS 删除 azure 上目标位置的其他文件)。重新启动并删除了 Azure Web 服务器上的所有文件。

enter image description here

web.config 翻译看起来不错

<dependentAssembly>
   <assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
   <bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" />   
</dependentAssembly>

编辑 Bruce Chen的回答为我指明了Kudu(Azure - 开发工具、高级工具)的方向

enter image description here

我下载了 Owin dll,但版本错误,即 3.0.0

为了解决这个问题,我清除了解决方案中的所有包工件

git clean -xfd(小心)

然后重建

最佳答案

我也在这上面浪费了几个小时,因为尽管 nuget 包被标记为 3.0.1,但 nuget 安装的引用版本为 3.0.0

使旧版本比新版本更新解决了我的问题:

      <dependentAssembly>
        <assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
        <bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0"/>
      </dependentAssembly>

*编辑:我认为(但不确定)我的版本仍然是 3.0.0.0 的原因是因为 bin 文件夹被我的存储库捕获并且 nuget 不想覆盖 dll

关于c# - 无法加载文件或程序集 Microsoft.Owin 3.0.0 到 3.0.1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39276347/

相关文章:

c# - 如何从 javadoc 中排除某些类/包/公共(public)成员

c# - 在 C# .NET 中用单个值初始化整数数组

azure - 如何从azure devops yaml管道中的工件中查找runID

azure - Active Directory 上授予同意失败并出现错误

c# - AES 加密解密的文本有多余的空格

c# - X509Certificate2.Verify() 总是返回 false

c# - .NET ConcurrentDictionary 初始容量设置为任意质数,而不是 MSDN 示例文档中的预期容量。为什么?

.net - 通过 vbs 脚本更改现有 COM+ 应用程序身份

.net - 有没有办法通过在 SQL Server 中使用 SQL 参数来指定临时表中的列长度?

azure - 用于获取 azure 中虚拟机 IP 地址的 REST URI