Visual Studio - VscHost提供未定义的主入口点

时间:2012-02-03 16:01:00

标签: c# visual-studio-2010 debugging exception

我有一个工作正常的主项目,但每次我尝试调试我们制作的一个TFS分支(完全相同的代码)时,我得到以下异常:

System.ArgumentException was unhandled
  Message=Main entry point not defined.
  Source=mscorlib
  StackTrace:
       at System.Runtime.Hosting.ManifestRunner..ctor(AppDomain domain, ActivationContext activationContext)
       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: 

它在我的同事的PC上工作得非常好,当我从调试文件夹打开它时也可以正常工作但是当我尝试调试时,它不会在调试器失败时启动。

我尝试了以下内容:

  • 创建新的入口点
  • 重新安装visual studio并禁用所有插件
  • 尝试使用x86 /任何CPU或调试/发布
  • 在新的TFS路径中尝试
  • 禁用调试/“启用Visual Studio托管过程”。

最后一个选项确实有效,我现在可以调试了。因此, vshost 似乎存在问题。

有关如何修复托管流程的任何想法?格式化和重新安装所有内容只是最后一个解决方案。

0 个答案:

没有答案