Jeremy Curios
Jeremy Curios

Reputation: 1

The name Process.Start does not exist in the current context

I'm a beginner programmer so I think I must be overlooking something simple, but after 2 hours of searching and even reinstalling Visual Studio I can't seem to fix this problem.

I need to start a 3rd party exe, so I need to use the Process class.

Process.Start(string)

However it gives a red line underneath and says: The name Process.Start does not exist in the current context. and The name Start does not exist in the current context.

These are the namespaces and I've referenced System and System.Diagnostics.Tracing also:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Diagnostics;

Upvotes: 0

Views: 547

Answers (1)

String.Empty
String.Empty

Reputation: 155

It looks like you may have put the using System.Diagnostics; directive inside a namespace and is calling Process.Start() from another namespace which does not contain that directive in it.

Could you share more of your code, perhaps?

Note: This would perhaps be more appropriate as a comment, but as a new contributor myself, I do not have enough reputation to add comments.

Upvotes: 1

Related Questions