gpt4 book ai didi

升级到2012年6月SDK后出现异常

转载 作者:行者123 更新时间:2023-12-03 22:08:17 25 4
gpt4 key购买 nike

我使用 2011 年 11 月的 SDK 启动并运行了一个项目,最近升级到了 2012 年 6 月的 SDK。当我第一次看到该错误时,我尝试了显而易见的方法 - 删除引用并添加更高版本,但这没有帮助。不知何故,似乎仍在请求版本 1.0.0.0。我还尝试删除引用并将旧版本添加回来,但没有成功。

这是它在我的代码中的显示方式。现在命中的第一个 Trace.WriteLine 报告以下异常:

System.IO.FileLoadException was unhandled by user code Message=Could not load file or assembly 'Microsoft.WindowsAzure.Diagnostics, Version=1.0.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) Source=mscorlib
FileName=Microsoft.WindowsAzure.Diagnostics, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 FusionLog==== Pre-bind state information === LOG: User = NT AUTHORITY\NETWORK SERVICE LOG: DisplayName = Microsoft.WindowsAzure.Diagnostics, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 (Fully-specified) LOG: Appbase = file:///F:/SVNProjects/myproject/SitePagesWebRole/ LOG: Initial PrivatePath = F:\SVNProjects\myproject\SitePagesWebRole\bin Calling assembly : (Unknown). === LOG: This bind starts in default load context. LOG: Using application configuration file: F:\SVNProjects\myproject\SitePagesWebRole\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: Microsoft.WindowsAzure.Diagnostics, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/Temporary ASP.NET Files/root/b117acb8/f2404402/Microsoft.WindowsAzure.Diagnostics.DLL. LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/Temporary ASP.NET Files/root/b117acb8/f2404402/Microsoft.WindowsAzure.Diagnostics/Microsoft.WindowsAzure.Diagnostics.DLL. LOG: Attempting download of new URL file:///F:/SVNProjects/myproject/SitePagesWebRole/bin/Microsoft.WindowsAzure.Diagnostics.DLL. WRN: Comparing the assembly name resulted in the mismatch: Minor Version ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.

StackTrace: at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, Boolean loadTypeFromPartialName, ObjectHandleOnStack type) at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, Boolean loadTypeFromPartialName) at System.Type.GetType(String typeName) at System.Diagnostics.TraceUtils.GetRuntimeObject(String className, Type baseType, String initializeData) at System.Diagnostics.TypedElement.BaseGetRuntimeObject() at System.Diagnostics.ListenerElement.GetRuntimeObject() at System.Diagnostics.ListenerElementsCollection.GetRuntimeObject() at System.Diagnostics.TraceInternal.get_Listeners() at System.Diagnostics.TraceInternal.WriteLine(String message) at myproject.GameAPI.Login(Int64 fbid, Int64[] friends) in F:\SVNProjects\myproject\GameLogic\GameAPI.cs:line 119
InnerException:

如何解决这个问题?

最佳答案

检查 web.config/app.config 中的所有角色。确保将对 Microsoft.WindowsAzure.Diagnostics 程序集的任何引用的版本号更改为版本 1.7.0.0

关于升级到2012年6月SDK后出现异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11171138/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com