开发者

Process Class Not Found in System.Diagnostics? (System.dll???)

I am using .NET Framework 3.5, I have referenced all the assemblies, I have 开发者_开发百科double checked everything, but still this irritating error

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

According to MSDN and various other sources, the Process class is definitely located in System.dll in the System.Diagnostics namespace. Then What In The World Is The Problem?


Ensure you are referencing the correct System.Dll. The version should be roughly v2.0.50727


I was also facing the same problem. I was using CodeDom to execute code that required Process Class. So the solution for me was to refrence System.dll in options. Here is the solution, if any one needs it.

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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜