无法加载文件或汇编azure.core,版本= 1.23.0.0

发布于 2025-02-11 10:15:15 字数 1947 浏览 1 评论 0原文

我有一个.NET 4.8 ASP.NET应用程序,并且在构建脚本上添加了Nuget,

 Azure.Security.KeyVault.Secrets, 4.3.0.0.
 Azure.Identity, .1.6.0.0.

它将DLLS复制到我的bin文件夹中,但是当我调试使用的代码时,它会引发错误无法加载文件或汇编azure .CORE,版本= 1.23.0.0 我检查了,并且已经引用了1.24.0.0。我认为这将与1.24版一起使用,因为它在参考上说明了> = 1.23

Pre-bind state information
LOG: DisplayName = Azure.Core, Version=1.23.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8
 (Fully-specified)
LOG: Appbase = file:///C:/xxx/
LOG: Initial PrivatePath = C:\xxx\bin
Calling assembly : Azure.Security.KeyVault.Secrets, Version=4.3.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8.

LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\xxx\web.config
LOG: Using host configuration file: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Post-policy reference: Azure.Core, Version=1.23.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/Temporary ASP.NET Files/aprimo/d096ca4b/f0bd3501/Azure.Core.DLL.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/Temporary ASP.NET Files/aprimo/d096ca4b/f0bd3501/Azure.Core/Azure.Core.DLL.
LOG: Attempting download of new URL file:///C:/xxxx/bin/Azure.Core.DLL.
WRN: Comparing the assembly name resulted in the mismatch: Minor Version
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.

任何人都知道为什么会发生这种情况。

I have a .NET 4.8 ASP.NET application and I added Nuget

 Azure.Security.KeyVault.Secrets, 4.3.0.0.
 Azure.Identity, .1.6.0.0.

On my build script It copied the dlls to my bin folder but when I debug the code thats using it, it throws an error Could not load file or assembly Azure.Core, Version=1.23.0.0
I checked and I have 1.24.0.0 already referenced. I assume this would work with version 1.24 because the its says on the reference >= 1.23
enter image description here
enter image description here

Pre-bind state information
LOG: DisplayName = Azure.Core, Version=1.23.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8
 (Fully-specified)
LOG: Appbase = file:///C:/xxx/
LOG: Initial PrivatePath = C:\xxx\bin
Calling assembly : Azure.Security.KeyVault.Secrets, Version=4.3.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8.

LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\xxx\web.config
LOG: Using host configuration file: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Post-policy reference: Azure.Core, Version=1.23.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/Temporary ASP.NET Files/aprimo/d096ca4b/f0bd3501/Azure.Core.DLL.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/Temporary ASP.NET Files/aprimo/d096ca4b/f0bd3501/Azure.Core/Azure.Core.DLL.
LOG: Attempting download of new URL file:///C:/xxxx/bin/Azure.Core.DLL.
WRN: Comparing the assembly name resulted in the mismatch: Minor Version
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.

Anyone have an idea why this is happening.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文