本文介绍了调试问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这个错误:

System.InvalidOperationException

  HResult = 0x80131509

 消息=无法初始化,因为没有CategoryName。

 来源=

 堆栈跟踪:

   在System.Diagnostics.PerformanceCounter.InitializeImpl()中,
   在System.Diagnostics.PerformanceCounter.EndInit()中,
    in HCP ___ EmailBomber_2._0.Form1.InitializeComponent()in C:\ Users \ Blazej \ Source \ Repos \ HCP - TEST \ HCP - TEST \ Form1.Designer.vb:row 621

   在HCP中___ EmailBomber_2._0.Form1..ctor()在C:\ Users \ Blazej \ Source \ Repos \ HCP - TEST \ HCP - TEST \ Form1.vb:第7行

System.InvalidOperationException
  HResult = 0x80131509
  Message = Can not initialize because there is no CategoryName.
  The source =
  Stack trace:
   in System.Diagnostics.PerformanceCounter.InitializeImpl ()
   in System.Diagnostics.PerformanceCounter.EndInit ()
   in HCP ___ EmailBomber_2._0.Form1.InitializeComponent () in C: \ Users \ Blazej \ Source \ Repos \ HCP - TEST \ HCP - TEST \ Form1.Designer.vb: row 621
   in HCP ___ EmailBomber_2._0.Form1..ctor () in C: \ Users \ Blazej \ Source \ Repos \ HCP - TEST \ HCP - TEST \ Form1.vb: line 7

它在定义时显示:

      Dim pool1 As String ="" 

     Dim pool1 As String = "" 

有人可以提供帮助吗?

编辑1:好的我发现问题,但如何解决这个问题

Ok i find the problem but how to fix this

这是在我添加一个性能计数器时如何修复它?

This is doing while im adding A performancecounter how to fix it?

推荐答案

PL:

System.InvalidOperationException

  HResult = 0x80131509

 消息=Wystąpiłbłądpodczastworzenia formularza。 Zobacz Exception.InnerException,abyouzyskaćszczegółoweeformacje。 Błąd:Niemożnazainicjować,ponieważbrakelementu CategoryName。

 来源= cpu meeter

  Śladstosu:

    w cpu_meeter.My.MyProject.MyForms.Create__Instance __ [T](T Instance)w:wiersz 190

    w cpu_meeter.My.MyProject.MyForms.get_Form1()

    w cpu_meeter.My.MyApplication.OnCreateMainForm()w C:\ Users \ Blazej \ Source \ Repos\cpu meeter\cpu meeter \ My Project \ Application.Designer.vb:wiersz 35

    w Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()

    w Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()

    w Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String [] commandLine)

    w cpu_meeter.My.MyApplication.Main(String [] Args)w:wiersz 81


$ b $bWewnętrznywyjątek1:
$
InvalidOperationException: Niemożnazainicjować,ponieważbrakelementu CategoryName。

System.InvalidOperationException
  HResult=0x80131509
  Message=Wystąpił błąd podczas tworzenia formularza. Zobacz Exception.InnerException, aby uzyskać szczegółowe informacje. Błąd: Nie można zainicjować, ponieważ brak elementu CategoryName.
  Source=cpu meeter
  Ślad stosu:
   w cpu_meeter.My.MyProject.MyForms.Create__Instance__[T](T Instance) w :wiersz 190
   w cpu_meeter.My.MyProject.MyForms.get_Form1()
   w cpu_meeter.My.MyApplication.OnCreateMainForm() w C:\Users\Blazej\Source\Repos\cpu meeter\cpu meeter\My Project\Application.Designer.vb:wiersz 35
   w Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
   w Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
   w Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
   w cpu_meeter.My.MyApplication.Main(String[] Args) w :wiersz 81

Wewnętrzny wyjątek 1:
InvalidOperationException: Nie można zainicjować, ponieważ brak elementu CategoryName.

ENG:

System.InvalidOperationException

  HResult = 0x80131509

  Message =创建表单时出错。有关详细信息,请参阅Exception.InnerException。错误:无法初始化,因为没有CategoryName元素。

 来源= cpu meeter

 堆栈跟踪:

    in cpu_meeter.My.MyProject.MyForms.Create__Instance __ [T](T Instance)in:line 190

    in cpu_meeter.My.MyProject.MyForms.get_Form1()

   在cpu_meeter.My.MyApplication.OnCreateMainForm()中的C:\ Users \ Blazej \ Source \ Repos \ cpu meeter \ cpu meeter \ My Project \ Application.Designer.vb:第35行

    in Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()

    in Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()

    in Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String [] commandLine)

    in cpu_meeter.My.MyApplication.Main(String [] Args)in:line 81



内部异常1:
$
InvalidOperationException:无法初始化,因为缺少CategoryName。

System.InvalidOperationException
  HResult = 0x80131509
  Message = An error occurred creating the form. See Exception.InnerException for detailed information. Error: Can not initialize because there is no CategoryName element.
  Source = cpu meeter
  Stack trace:
   in cpu_meeter.My.MyProject.MyForms.Create__Instance __ [T] (T Instance) in: line 190
   in cpu_meeter.My.MyProject.MyForms.get_Form1 ()
   in cpu_meeter.My.MyApplication.OnCreateMainForm () in C: \ Users \ Blazej \ Source \ Repos \ cpu meeter \ cpu meeter \ My Project \ Application.Designer.vb: line 35
   in Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun ()
   in Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel ()
   in Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run (String [] commandLine)
   in cpu_meeter.My.MyApplication.Main (String [] Args) in: line 81

Internal exception 1:
InvalidOperationException: Could not initialize because the CategoryName is missing.

有人可以提供帮助吗?


这篇关于调试问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-16 12:50