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";
精彩评论