【问题标题】:Method not found: 'Void System.Diagnostics.Tracing.FrameworkEventSource.BeginGetResponse(System.Object, System.String)'找不到方法:'无效 System.Diagnostics.Tracing.FrameworkEventSource.BeginGetResponse(System.Object,System.String)'
【发布时间】:2015-08-19 13:51:19
【问题描述】:

我今天升级到 Windows 8.1。升级后,我的一个 WPF 窗口出现以下异常:

XAML Exception: Provide value on 'System.Windows.Baml2006.TypeConverterMarkupExtension' threw an exception.

Inner Exception: Method not found: 'Void System.Diagnostics.Tracing.FrameworkEventSource.BeginGetResponse(System.Object, System.String)'.

在更新我的 Windows 之前,我没有收到此异常。请注意,当我从窗口中删除图标时,不会发生异常 - Icon="/MyProgram;component/Resources/language.png"

未处理的堆栈跟踪如下:

    Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Windows.Markup.XamlParseException
Stack:
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(System.Object)
   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)
   at System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame)
   at System.Windows.Application.RunDispatcher(System.Object)
   at System.Windows.Application.RunInternal(System.Windows.Window)
   at System.Windows.Application.Run(System.Windows.Window)
   at System.Windows.Application.Run()
   at MaxCut.App.Main()

我猜测的另一个问题与上述问题有关:当我尝试在 Visual Studio 2013 Update 4 中创建新项目时,出现以下错误

“无法从文本 '..\Images\Medium.png' 创建一个 'ImageSource'

我已经尝试了以下解决方案 http://blogs.msdn.com/b/vsnetsetup/archive/2013/03/19/visual-studio-2012-ide-shows-failed-to-create-a-imagesource-from-the-text-images-medium-png-while-accessing-file-new-file-open-dialog-boxes.aspx

https://connect.microsoft.com/VisualStudio/feedback/details/830040/failed-to-create-a-imagesource-from-the-text-images-medium-png

Visual Studio 2012 failed to create project

Error when trying to start a new project in Visual Studio

【问题讨论】:

    标签: c# .net wpf windows visual-studio-2013


    【解决方案1】:

    NET Framework 4.6 帮了我大忙,希望它也适用于你!

    http://www.microsoft.com/en-us/download/confirmation.aspx?id=44928

    【讨论】:

      【解决方案2】:

      致遇到此问题的任何人。请注意,安装他以下两个更新后,问题已解决:

      为基于 x64 的系统升级到 windows 8.1 (KB3063843)

      为基于 x64 的系统升级到 windows 8.1 (KB3068708)

      【讨论】:

      • IMO 这应该是正确的答案。在我的机器上,仅安装 KB3063843 会有所帮助。无需安装这些答案中提到的 .NET 4.6 或 KB3068708。
      【解决方案3】:

      我正在运行一个新的 .NET WebApi 站点(.Net 版本 4.5.2),该站点在我的工作托管 Windows 7 PC 上本地构建,并部署到我没有升级权限的 Windows Server 2012。

      我能够通过删除以下 nuget 包来解决这个问题并部署我的网站:

      • Microsoft.AspNet.TelemtryCorrelation
      • System.Diagnostics.DiagnosticSource

      【讨论】:

      • 当我将目标从 4.6.1 降级到 4.5.2 时,运行 PM 命令 PM> Update-Package -Reinstall。然后把上面的两个nugget包去掉。清理解决方案并重建。
      【解决方案4】:

      我删除了所有应用洞察包和诊断包。

      【讨论】:

        猜你喜欢
        • 2015-08-14
        • 2021-06-17
        • 2012-04-22
        • 2021-12-27
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2019-08-18
        相关资源
        最近更新 更多