How can I set a project-specific environmental variable in Visual Studio? - 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.

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:
You can also do this with property sheets if you're so inclined or need this for multiple projects.

Related

Change SSIS protection level for Project in VS 2010

I am using Visual Studio 2010 Shell and I have had to change my ProtectionLevel to 'DontSaveSensitive' mid project.
Now I get an error: Basic Checks.dtsx has a different ProtectionLevel than the project.
However, there is nowhere in the Project properties that I can see where the ProtectionLevel can be changed to match. All searches seem to indicate this is easy in VS 2012 but can't find any info for VS 2010
Any help would be greatly appreciated!
thanks
Ravi
You have two different places where you can set ProtectionLevel.
First place is properties pane of a package, second place is properties pane of entire project (right click on a project and you will find it under Common Properties). Ensure that you have the same setting in both places.

Can I have VS2010 change the environment settings based on the project loaded?

see title
For example: Open a C++ project, it opens using the C++ environment settings or an arbitrary environment settings file. Then open a C# project and then it opens using the C# environment settings or an arbitrary environment settings file.
Or should I honestly not care and just use the interface I already set up? What advantages would there really be for switching them per project/project type?
Maybe Perspectives extension can help you. After installing you can save your current layout as perspective (just like in Eclipse) in Visual Studio 2010.

VS2010 Macro To Change Environment Settings Based on Build Configuration

I want to change my environment colors when I switch from "Debug" to "Release" configuration in Visual Studio 2010. I want it to really stand out that I have changed a configuration. Is there an event I can handle with a Visual Studio macro to find out when the configuration dropdown has changed? Also, can anyone point me to the object where I change the VS environment's colors? Thanks.

Resetting a Visual Studio C++ project's settings

I changed some parameters in a Visual Studio C++ project, and now I don't remember how to "go back". Is it possible to reset the build settings?
I don't mean the IDE settings (menu Tools -> Import and Export Settings).
Am I the only person that can read?!
The only way I know how to reset a "Parameter in a Project's Settings",,,
Is to open the Project file(csproj, vcxproj) with a text editor, and remove the block defining that parameter.
If you wanted to reset the Allow Isolation value, you would delete this text.
<AllowIsolation>true</AllowIsolation>
When project files are loaded by visual Studio, values which are not explicitly defined in the file, are assumed to be using the default. This will only work if the property has a default value(can't change some).
NOTE: This is NOT the same as Deleting the value from the Project Properties Dialog in VS. That method writes a blank value to your project file.
The command "devenv /resetsettings" will restore Visual Studio back to its original factory state.
You can find list of devenv switches here.
You may be able to get the previous/saved version of your Visual Studio project (*.vcproj) from your software version control system.
As many wrote here before, there is a need to reset your visual studio to default settings. Just follow this: https://msdn.microsoft.com/en-us/library/ms247075(v=vs.90).aspx
Here is the awful method I used in Visual Studio 2022.
In "Property" pages, expand the individual configuration you want.
Click "All Options" and find the bold options you had changed.
To restore the defaults, click the options and select "<inherit from parent or project defaults>".
Click "Apply", then it will recover its original value.
Otherwise, you can compare the *.vcxproj with the project templates.

How do I change my development environment to a different language in Visual Studio?

When I first installed Visual Studio, I chose to customize my environment for "Visual C++" development. Now, I am working primarily in C# and want to change this setting to a C# environment.
How can I change the environment settings from one language to another in Visual Studio?
Tools → Import and Export Settings → Import Selected Environment Settings...
A dialog will appear, prompting you whether or not you want to save your current settings. If you've made extensive customizations and might want to go back to them at a later date, you should choose to save them.
Then click "Next". You'll be prompted to import a set of environment settings. At the top will be the default environment settings options, customized for each language. In your case, you'd choose C#.
If you wanted to re-import your saved settings, you'd do it the same way—just browse to the saved settings file in the final step of the wizard.
You could also reset all of the settings from the command line:
devenv /resetsettings
And then choose all over again when prompted.
Note: I prefer "General Developer Settings" if you are going to do development in different technology areas (C++, C#, VB, etc.).

Resources