Everybody! This is important. In a few days, these forums will be moving over to using the totally sweet Discourse platform. To ensure this migration happens smoothly with no loss of content, these forums are currently in a read-only mode. I do apologize for the inconvenience.

There is never a good time to turn the forums off for an extended period of time, but I promise the new forums will be a billion times better. I'm pretty sure of it.

See you all on the other side in a few days, and if you have any (non-technical) questions, please e-mail me at kirupa@kirupa.com. For technical questions, try to find a tutorial that corresponds to what you are looking for and post in the comments section of that page.

Cheers,
Kirupa

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