在启动Visual Studio调试器例外 [英] Visual Studio Debugger exception on launch

查看:274
本文介绍了在启动Visual Studio调试器例外的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我启动WinForms项目(项目只包含一个源文件,Program.cs中),与下面的异常不具有堆栈跟踪调试程序中断:

When launching my WinForms project (project only contains one source file, Program.cs), the debugger breaks with no stack trace on the following exception:

System.ArgumentNullException was unhandled
Message="Value cannot be null.\r\nParameter name: activationContext"
Source="mscorlib"
ParamName="activationContext"
StackTrace:
   at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext, String[] activationCustomData)
   at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext)
   at System.Activator.CreateInstance(ActivationContext activationContext)
   at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()
InnerException: 

这除了是我的主要前​​抛出甚至进入()函数,所以我不知道如何解决这个问题。

This exception is thrown before my Main() function is even entered, so I have no idea how to fix this.

这是在Visual C#2008年项目设立的ClickOnce发布。

This is in Visual C# 2008. The project is set up for ClickOnce publishing.

推荐答案

即使这一个是很老。对我来说,只是清洁液(生成>清理解决方案)做的工作。

Even if this one is pretty old. For me simply cleaning the solution (Build > Clean Solution) did the Job.

这篇关于在启动Visual Studio调试器例外的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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