Results 1 to 5 of 5

Thread: No Process class?

  1. #1

    No Process class?

    I am "using System; using System.Diagnostics;"

    And when I do "Process p;" it says the type or namespace name could not be found. I even copied/pasted code from a website, and still the same thing. Could there be error with my .NET framework? I really don't want to re-install it, btw.

    Thanks!

  2. #2
    I played around with this a bit, and found the solution. The problem occurred when I had "Empty Project." I created a new project "Console Application," and then I was able to "load" the Process class/namespace. Can anyone explain to me why this would happen? I did a few searches online, but didn't find much help...

    Those who have been using C# for a while, what type of project do you mostly choose that are NOT GUI?

    Thanks!

  3. #3
    You need the reference. Go to the solution window (located on the right side and right click on it and select add reference). Empty project is just that, empty.

    Console applications are normally the non-GUI projects. It will default and add certain references.

    Just for some future information you can create class library for creating a dll with a project. Useful if you are using certain code in multiple solutions. In this way instead of including the files you just include the project and in the solution put a reference to the project and it includes the .dll (dynamic link library) file when building the solution.
    Last edited by Sirisian; August 12th, 2008 at 11:10 PM.

  4. #4
    I wrote about References and Using Directives a few weeks ago that should help: http://www.kirupa.com/blend_silverli...ctives_pg1.htm

  5. #5
    Thanks guys. Yes, I saw references, and that's how I was able to figure out that it had to include a few "things" to make it work properly, such as system.dll.


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012