VC++ 2010 include/lib path - visual-c++

Is there a place to set header and library path for ALL projects in VC2010 express?
When i set them they seem to only apply to a single project (eg i have to set them everytime i start a new project).

I think you can set the env vars: INCLUDE and LIBPATH for this.
Not sure how to do it from the GUI - but from the control panel it is straightforward. I don't know if Visual Studio appends to that or just sets/overwrites it though.

Use property sheet files. *.vsprops Change default one for the platform you need. They are under Property Manager Tab, near Solution Explorer.
See this MSDN help for mor information: "VC++ Directories Property Page"

Related

How to choose which file to debug in Visual Studio 2012 prof

Kinda stupid question, but I've only been using this IDE for two days now. I havent found anything in google yet and I figured that once in a while you're entitled to a stupid question:
I have a project (or solution as Microsoft chose to call it) with two .cs-files. When I click on debug, it's alwys the same file that opens. How can I get VS to open the other .cs-file?
It sounds like you have multiple static Main methods in your project. If that's the case then you have to set the startup object to the object that you want to run.
Right-click on the project in the Solution Explorer and select
Properties (or select Project >> Projectname Properties from the
toolbar).
On the Application form, select the appropriate value
for Startup Object.

How to add a default include path in MSVC++ 2012?

I would like to add an include and library path to the default configuration in VC++ 2012. I know I can add it manually per project, but there is a checkbox "Inherit from parent or project defaults". I would like to modify this "project defaults" so it applies to all my projects.
Any clue of where to edit this?
***EDIT
No, that answer doesn't help. I edited the vsvars32.bat file, run the bat to check that INCLUDE and LIB variables where updated with my own path (and they are), but when I start MSVC++ 2012 my added path is not included.
It's a bit of a pain, and there is a blog post on MSDN that explains in detail, but in summary here's how you do it:
Open a project, any project.
From the menu, choose View / Property Manager (near the bottom of the menu)
In the property manager window, expand the project tree to show Debug and Release nodes
Expand either Debug or Release (it doesn't matter which)
Right-click on Microsoft.Cpp.Win32.user
Choose Properties from the pop-up menu
You should see a dialog where you can edit the VC++ Directories entry like this:
Once you OK through everything, any project you create or load will inherit these defaults.

Visual studio - set file location

I have a VS project, but I moved some source, resource files to another location.
It's not easy for me to readd all again (cause of filled properties tab for custom build tools, etc.)
Is there any easy GUI way to change the included source file path? In XCode it's easy to do this, but I don't see any way in Visual Studio (currently using 2012).
Do I have to rewrite the xml build file?
I have finally find it. Easiest way is to edit the xml file .vcxproj. I just have to manually find the paths (they are relative... i dont really know why Microsoft did this, it is so stupid) in that xml and edit it.

Visual C++ 2010 default settings

Can I get the default settings for Visual C++ 2010? I messed up a bit when I tried to get DarkGDK to work with it. I need to know what is the default "Include Directories", "Library Directories", "Additional Dependencies", and lastly "Ignore Specific Default Libraries". Thanks.
What settings did the brand new project have in those four fields?
If those weren't right, time to run "Repair Installation" from control panel or the Visual Studio Help menu.
My "Additional Dependencies" is "kernel32.lib;user32.lib;gdi32.lib;comctl32.lib;ole32.lib;shell32.lib;winmm.lib", but whether that's applicable to you or not depends on the project type.
Executable Directories is "$(VCInstallDir)bin;$(WindowsSdkDir)bin\NETFX 4.0 Tools;$(WindowsSdkDir)bin;$(VSInstallDir)Common7\Tools\bin;$(VSInstallDir)Common7\tools;$(VSInstallDir)Common7\ide;$(ProgramFiles)\HTML Help Workshop;$(FrameworkSDKDir)\bin;$(MSBuildToolsPath32);$(VSInstallDir);$(SystemRoot)\SysWow64;$(FxCopDir);$(PATH);"
Include Directories is "$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSdkDir)include;$(FrameworkSDKDir)\include;"
Library Directories is "$(VCInstallDir)lib;$(VCInstallDir)atlmfc\lib;$(WindowsSdkDir)lib;$(FrameworkSDKDir)\lib"
Ignore Specific Default Libraries is blank.

Change "Visual Studio 2010" folder location

I would like to change the "Visual Studio 2010" folders location to my Dropbox folder, so it gets synced every time I make a change. I have searched on the internet, but haven't found a solution yet.
Is it possible to change the "Visual Studio 2010" folders location from within Visual Studio 2010, specifically Visual C# Express 2010?
If you want to relocate everything in the Visual Studio 2010 folder, it takes a couple steps:
In Visual Studio, go to Tools > Options > Projects and Settings > General. Set the three locations as desired.
In Registry Editor, navigate to HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0. Set the remaining locations that still reference Documents\Visual Studio 2010 as desired.
Tools > Options > Projects and Solutions > General > "Projects location" setting. Change the others too if you routinely create templates.
As stated by the other answers, some of the paths are configurable (settings, default projects location, and the user template locations) and can be set under Tools->Options. However, it is important to note that the actual registry value that determines the root path is at HKCU\Software\Microsoft\VisualStudio\12.0\VisualStudioLocation, and that this value is only taken into account if HKCU\Software\Microsoft\VisualStudio\12.0\MyDocumentsLocation is set correctly.
To change these registry keys properly:
Make sure Visual Studio is not running.
Open the registry editor and first make sure that HKCU\Software\Microsoft\VisualStudio\12.0\MyDocumentsLocation is set to your actual My Documents location (this is very important, otherwise some of the other paths in the registry will take on default values on the next open/close cycle) and does not have a trailing slash. If this registry value is not there, you must add it.
Change the HKCU\Software\Microsoft\VisualStudio\12.0\VisualStudioLocation to whatever path you'd like the files to be stored at.
(Optional, but recommended) Search for more references to the old path in the registry under both 12.0 and 12.0_Config and update them accordingly.
Note that if you ever change the location of My Documents in Windows, several of the paths (including VisualStudioLocation, which most of the others are based on) will revert to their defaults, and you'll have to follow the steps above again.
(Modify the Visual Studio version number as applicable -- 12.0 is for VS2013, 11.0 for VS2012, etc.)
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\NewProjectDialog\MRUSettingsVenusProjectLocationEntries
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\NewProjectDialog\MRUSettingsLocalProjectLocationEntries
if above solution doesnt work try this ones.
From Tools Option> projects and Solution as show down
In case someone come across this question these days, in VS2017 Community there is a "Location" node under Tools-> Options-> Projects and Solutions-> Locations. The fields are no longer under "General".

Resources