wpf 找不到方法:'Void System.Diagnostics.Tracing.FrameworkEventSource.BeginGetResponse(System.Object, System.String)'

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/32097492/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-13 13:21:07  来源:igfitidea点击:

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

c#.netwpfwindowsvisual-studio-2013

提问by jayd page

I upgraded to windows 8.1 Today. After the upgrade I am experiencing the following exception on one of my WPF windows:

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

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

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)'.

I was not getting this exception before updating my windows. Note that when I remove the Icon from the window the exception does not occur - Icon="/MyProgram;component/Resources/language.png"

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

Unhandled stack trace is a follows:

未处理的堆栈跟踪如下:

    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()

Another issue which I am guessing is related to the one above: When I try to create a new project in Visual Studio 2013 Update 4, I get the following Error

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

"Failed to create a 'ImageSource' from the text '..\Images\Medium.png'

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

I have already tried the following solutions 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

我已经尝试了以下解决方案 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

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

Visual Studio 2012 无法创建项目

Error when trying to start a new project in Visual Studio

尝试在 Visual Studio 中启动新项目时出错

回答by Alex Finelt

NET Framework 4.6 did the trick for me, hope it works for you as well!

NET Framework 4.6 为我解决了问题,希望它也适用于您!

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

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

回答by jayd page

To anybody who comes across this issue. Note that that after installing he following two updates the problem was resolved:

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

Upgrade to windows 8.1 for x64-based Systems (KB3063843)

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

Upgrade to windows 8.1 for x64-based Systems (KB3068708)

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

回答by dckuehn

I am running a new .NET WebApi site (.Net version 4.5.2) that builds locally on my work-managed Windows 7 PC, and deploys to Windows Server 2012 where I do not have upgrade permissions.

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

I was able to solve this problem and deploy my site by removing the nuget packages for:

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

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

回答by Ziaullah Khan

I removed all the application insights packages and Diagnostics package.

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