System.Diagnostics.Process

  • Thread starter Thread starter Palamalai Gopi Gopalakrishnan
  • Start date Start date
P

Palamalai Gopi Gopalakrishnan

I just installed the VS Studio 2008 express version. I can't seem to be able
to use the System.Diagnostics.Process type in a simple program. Any ideas
why?


error I get is:

Error 1 The type or namespace name 'Process' does not exist in the namespace
'System.Diagnostics' (are you missing an assembly reference?)C:\Users\Gopi\Documents\VisualStudio 2008\Projects\hello world\hello world\HelloWorld.cs 19 28 hello world
Error 2 The type or namespace name 'Process' could not be found (are you
missing a using directive or an assembly reference?)C:\Users\Gopi\Documents\VisualStudio 2008\Projects\hello world\hello world\HelloWorld.cs 19 42 hello world


using System;
using System.Diagnostics;
using System.Reflection;



class Program
{


public static void Main(string[] args)
{


System.Diagnostics.Process = new Process();


}
}
 
Hi,

This usually happens if You miss a reference to a required assembly. Make
sure You have referenced the System assembly from Your project. To do this :
- Select Your project in the solution explorer.
- open the References node, under your projects node
- check if there is a "System" node under References, if not go to menu:
Project-> Add Reference..., make sure ".Net" tab is selected and look for
System, when You find it press Ok.

Hope this solves Your problem.
-Zsolt

"Palamalai Gopi Gopalakrishnan" <[email protected]> az alábbiakat írta a
következo üzenetben
news:D[email protected]...
 
Even after I fixed the code problem you mentioned I get the error.

Error 1 The type or namespace name 'Process' does not exist in the namespace 'System.Diagnostics' (are you missing an assembly reference?) C:\Users\Gopi\Documents\Visual Studio 2008\Projects\hello world\hello world\HelloWorld.cs 19 28 hello world
Error 2 The type or namespace name 'Process' could not be found (are you missing a using directive or an assembly reference?) C:\Users\Gopi\Documents\Visual Studio 2008\Projects\hello world\hello world\HelloWorld.cs 19 43 hello world


I am guessing I never had the reference in the first place. May be VS Studio Express version does not make this type available? Could that be the case?
 
C# Express does indeed support System.Diagnostics namespace. Make sure you have added a reference to it in your references. The reply from miher below lists the steps.

Quote:
Hi,

This usually happens if You miss a reference to a required assembly. Make
sure You have referenced the System assembly from Your project. To do this :
- Select Your project in the solution explorer.
- open the References node, under your projects node
- check if there is a "System" node under References, if not go to menu:
Project-> Add Reference..., make sure ".Net" tab is selected and look for
System, when You find it press Ok.

Hope this solves Your problem.
-Zsolt

--

Enjoy Everything!
http://davisdesu.com
http://ddproc.net
Even after I fixed the code problem you mentioned I get the error.

Error 1 The type or namespace name 'Process' does not exist in the namespace 'System.Diagnostics' (are you missing an assembly reference?) C:\Users\Gopi\Documents\Visual Studio 2008\Projects\hello world\hello world\HelloWorld.cs 19 28 hello world
Error 2 The type or namespace name 'Process' could not be found (are you missing a using directive or an assembly reference?) C:\Users\Gopi\Documents\Visual Studio 2008\Projects\hello world\hello world\HelloWorld.cs 19 43 hello world


I am guessing I never had the reference in the first place. May be VS Studio Express version does not make this type available? Could that be the case?
 
Thanks everyone that worked.

miher said:
Hi,

This usually happens if You miss a reference to a required assembly. Make
sure You have referenced the System assembly from Your project. To do this
:
- Select Your project in the solution explorer.
- open the References node, under your projects node
- check if there is a "System" node under References, if not go to menu:
Project-> Add Reference..., make sure ".Net" tab is selected and look for
System, when You find it press Ok.

Hope this solves Your problem.
-Zsolt

"Palamalai Gopi Gopalakrishnan" <[email protected]> az alábbiakat írta a
következo üzenetben
I just installed the VS Studio 2008 express version. I can't seem to be
able to use the System.Diagnostics.Process type in a simple program. Any
ideas why?


error I get is:

Error 1 The type or namespace name 'Process' does not exist in the
namespace 'System.Diagnostics' (are you missing an assembly
reference?)C:\Users\Gopi\Documents\VisualStudio 2008\Projects\hello
world\hello world\HelloWorld.cs 19 28 hello world
Error 2 The type or namespace name 'Process' could not be found (are you
missing a using directive or an assembly
reference?)C:\Users\Gopi\Documents\VisualStudio 2008\Projects\hello
world\hello world\HelloWorld.cs 19 42 hello world


using System;
using System.Diagnostics;
using System.Reflection;



class Program
{


public static void Main(string[] args)
{


System.Diagnostics.Process = new Process();


}
}
 
Back
Top