Winforms听读程序启动异常及VS DiagnosticsHubPackage报错求助
WinForms听读程序在VS2022中打开报错,运行时axWindowsMediaPlayer初始化失败
大约一个月前用WinForms写了个简单的听读程序辅助工作,之前一直正常运行,最近突然出问题了。
打开项目时的错误提示
用Visual Studio 2022重新打开项目时,弹出如下错误:
The ‘DiagnosticsHubPackage’ package did not correctly.The problem may have been caused by a configuration change or by the installation of another extension. You can get more information by examining the file 'C:...\VisualStudio\17.0_e476ad3d\ActivityLog.xml'.
查了不少资料都没头绪,有人说要更新Windows或VS,但之前程序好好的,这个建议明显不合理。点提示框的「是」后能正常进入VS并打开项目,但运行项目时又出现新的异常。
运行时的异常信息
运行项目时,自动生成的代码里抛出System.ArgumentException:
System.ArgumentException: 'Source object does not expose 'IPropertyNotifySink' event interface.'
出错的代码片段:
this.tableLayoutPanel2.ResumeLayout(false); this.tableLayoutPanel2.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.axWindowsMediaPlayer1)).EndInit(); // 错误行 this.ResumeLayout(false);
有没有遇到过相同问题的朋友?求一起探讨解决办法。
内容的提问来源于stack exchange,提问作者Yamp
相关产品推荐
相关产品推荐

