Vivek Kumar
Vivek Kumar

Reputation: 5040

How can I set a project-specific environmental variable in Visual Studio?

I need to know whether there is any setting available in "visual studio project setting" to create a environment variable like thing in visual studio 2008 Express edition so that I need not to add into "system variable" for any specific project.

Upvotes: 1

Views: 3779

Answers (1)

Cody Gray
Cody Gray

Reputation: 244672

Yes, there most definitely is!

You can configure environment variables for the debugger for an individual project. You'll find the options in your project's Properties window (Alt+F7), under the "Debugging" category.

Fill in the "Environment" property with whatever variables you like.

The screenshot is from VS 2010, but everything looks pretty much the same in VS 2008:

Look for the "Environment" property under the "Debugging" category

You can also do this with property sheets if you're so inclined or need this for multiple projects.

Upvotes: 3

Related Questions