运行项目之前出现VS错误(通过反射调用的方法引发未捕获的异常) [英] VS Error before running a project (Uncaught exception thrown by method called through Reflection)

查看:180
本文介绍了运行项目之前出现VS错误(通过反射调用的方法引发未捕获的异常)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的一名学生在Visual Studio中尝试运行项目时遇到了一个奇怪的问题.由于此错误,甚至无法运行项目(C ++,C#等).他只是得到了PC,所以它是全新安装,已经尝试重新安装Visual. 工作室,但无济于事.他能够构建项目,但无法运行它们(调试或发布).他正在接收的错误如下:由通过反射调用的方法引发的未捕获异常".希望大家知道解决方案 问题. (以下是错误的屏幕截图)


Thomas Goussaert-www.digitalartsandentertainment.com(DAE)

解决方案

嗨托马斯,

请基于此文档创建一个简单的Visual C#Windows窗体应用程序: 步骤1:创建Windows窗体应用程序项目,然后调试/运行此应用程序以检查是否相同 问题将会发生.

如果简单的Windows窗体应用程序发生相同的错误,则问题出在Visual Studio上或开发环境.如果是这样, 您可以尝试以下步骤进行简单的测试:

  1. 创建新的用户帐户并运行VS.如果您可以正常运行,则您的用户个人资料已损坏,您必须创建一个新帐户并将当前用户信息复制到该帐户.
  2. 在操作系统上进行一些文件检查或修复.例如Sfc/scannow  http://support.microsoft.com/kb/929833

如果两项测试都表明您的操作系统还不错,我们必须检查一下对于VS.

步骤1:使用devenv/log收集activity.xm日志并查找此日志中的HR错误. http: //msdn.microsoft.com/zh-cn/library/ms241272(v=vs.120).aspx 如果显示某些软件包损坏,请修复您的VS.

步骤2:尝试使用其他devenv命令修复:

1.devenv.exe  /safemode

2.devenv.exe  /resetskippkgs

3.devenv.exe  /installvstemplates

4.devenv.exe  /resetsettings

5.devenv.exe  /resetuserdata 

devenv.exe可以位于VS位置/Common7/IDE下

您需要的是将其放入运行提示并向其中添加命令

完成建议后,请随时回来.

最好的问候,


Hi,

One of my students has a strange problem when trying to run a project in Visual Studio. it's not even possible to run a project (C++, C#, ...) because of this error. He just got his PC so it's a clean install and already tried reinstalling Visual Studio, but nothing helps. He's able to build the projects but can't run them (debug or release). The error he's receiving is the following: "Uncaught exception thrown by method called through Reflection". I hope any of you know a solution for this problem. (Below is a screenshot of the error)


Thomas Goussaert - www.digitalartsandentertainment.com (DAE)

解决方案

Hi Thomas,

Please create a simple Visual C# windows forms application based on this document: Step 1: Create a Windows Forms Application Project and debug/run this application to check whether the same issue will occur.

If the same error occurs with a simple windows forms app, the issue is on your Visual Studio or development environment. If that is the case, you may try the following steps to do a simple test:

  1. Create a new user account and run VS. If you can run without problem, your user profile is corrupt and you have to create a new account and copy current user info to it.
  2. Do some file check or repair on your OS. Such as Sfc/scannow  http://support.microsoft.com/kb/929833

If the two tests all say your OS is alright, we have to check for VS.

Step 1: Use devenv /log to gather activity.xm log and find HR error from this log.  http://msdn.microsoft.com/en-us/library/ms241272(v=vs.120).aspx If it shows some package corrupt, please repair your VS.

Step 2: Try some other devenv commands to fix:

1.devenv.exe  /safemode

2.devenv.exe  /resetskippkgs

3.devenv.exe  /installvstemplates

4.devenv.exe  /resetsettings

5.devenv.exe  /resetuserdata 

devenv.exe can be located under your VS location/Common7/IDE

What your need is to put it to run prompt and add commands to it.

Once you finish my suggestions, please feel free to come back.

Best regards,


这篇关于运行项目之前出现VS错误(通过反射调用的方法引发未捕获的异常)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆