我有一个工作正常的主项目,但每次我尝试调试我们制作的一个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上工作得非常好,当我从调试文件夹打开它时也可以正常工作但是当我尝试调试时,它不会在调试器失败时启动。
我尝试了以下内容:
最后一个选项确实有效,我现在可以调试了。因此, vshost 似乎存在问题。
有关如何修复托管流程的任何想法?格式化和重新安装所有内容只是最后一个解决方案。