-1

I'm currently using C# Express. It does have a system.dll 4.2 and I added this reference. However, there are lots of stuff missing in it; such as the Process class in the System.Diagnostics namespace.

BTW, another question: each dll file has some namespace and the System.Diagnostics namespace is declared in the system.dll file. Am I right about that? So what if I want to use the process class?

thanks

Brian
  • 5,069
  • 7
  • 37
  • 47
henryyao
  • 1,758
  • 6
  • 23
  • 37
  • I am not following... I use C# Express and adding a reference to `System.Diagnostics`, am able to access the `Process class` just fine. Can you post some code? – Brian Jan 30 '13 at 23:11
  • 7
    What project type are you creating? Sounds like one that doesn't support `Process` (Windows Store apps). – keyboardP Jan 30 '13 at 23:12
  • Possible duplicate http://stackoverflow.com/questions/11845828/missing-reference-to-system-diagnostics-process – JG in SD Jan 30 '13 at 23:27
  • @keyboardP I'm building a netduino plus project. it's a device board. is it because that its not win store app? – henryyao Jan 31 '13 at 19:26
  • @henryyao - No, Win Store apps don't have access to `Process` and `Netduino` doesn't either. I'm not familiar with it but it seems to be based on the `.NET Micro Framework` which doesn't have support for the `Process` class. – keyboardP Jan 31 '13 at 19:31
  • @keyboardP I think u r right. It is a .net micro framwork based project. So is there another a way out or there is no way... – henryyao Jan 31 '13 at 19:53
  • @henryyao Unfortunately I doubt it'd be as easy as using the `Process` class. What do you need to do? – keyboardP Jan 31 '13 at 20:31
  • @keyboardP I need to see the status of my threads in this process. – henryyao Jan 31 '13 at 20:52
  • @henryyao - You could try using the [System.Threading](http://msdn.microsoft.com/en-us/library/ee436582.aspx) namespace. It has a [Thread](http://msdn.microsoft.com/en-us/library/ee436590.aspx) class with status properties. – keyboardP Jan 31 '13 at 21:07
  • Good grief, all of this could have been so much easier if you had specified this in the question. And the comment block is not a place to ask additional questions. Please post another, and be more specific the next time. – theMayer Feb 01 '13 at 16:40

2 Answers2

2

Netduino uses the .NET Micro Framework which doesn't support the Process class.

keyboardP
  • 68,824
  • 13
  • 156
  • 205
1

Try uninstalling and re-installing VCS excpress. It seems I remember seeing a similar issue somewhere (I know, really specific), that this solved that problem.

The other thing might be to check the target framework of your project, and make sure it's not using Metro or compact or anything of the sort.

Edit: quick search led me to this: Missing reference to System.Diagnostics.Process

Community
  • 1
  • 1
theMayer
  • 15,456
  • 7
  • 58
  • 90