System.Diagnostics中找不到进程类? (System.dll中???)

我正在使用.NET Framework 3.5,我已经引用了所有程序集,我已经仔细检查过所有内容,但仍然存在这种恼人的错误

CS0234: The type or namespace name 'Process' does not exist in the namespace 'System.Diagnostics' (are you missing an assembly reference?) (CS0234) (Proj1) 

根据MSDN和其他各种来源,Process类绝对位于System.Diagnostics命名空间的System.dll中。 那么世界上的问题是什么?

确保您引用了正确的System.Dll。 版本应大致为v2.0.50727

我也面临同样的问题。 我使用CodeDom来执行需要Process Class的代码。 所以我的解决方案是在选项中引用System.dll。 如果有人需要,这是解决方案。

 CSharpCodeProvider cs = new CSharpCodeProvider(); cs.CompilerOptions = "/optimize /reference:System.dll";