Visual C++ 2010 project properties macros - how to edit? - visual-studio

I need to change the value of macro TargetExt. How can I do this? I can't find a way to do that from IDE (??!) and those macros aren't stored in project file either.

Go to: Project -> NAME properties... -> Configuration properties -> Target Extension

Related

How do I create a navigation Item in Visual Studio 2017 Extensions

I have followed this post to get a menu item running in Visual Studio 2013, but I have been unable to get the navigation item working, either by upgrading the original code to 2017, or by following the same instructions in VS 2017.
In VS 2013 I can create a class as below and it gets loaded automatically, but not in the 2017 version.
[TeamExplorerNavigationItem(GuidList.sampleTeamExplorerNavigationItem, 100)]
public class SampleTeamExplorerNavigationItem : ITeamExplorerNavigationItem
{
...
}
The key missing ingredient was ensuring that the "Microsoft.VisualStudio.MefComponent" Asset is added in the source.extension.vsixmanifest. Double click on the manifest file in the solution explorer and the file should open in the designer. Go to the assets page and "Add" the file.
Additionally ensure that "System.ComponentModel.Composition" and (as suggested by Cole above) Microsoft.TeamFoundation.Controls.dll are referenced.
If you use visual studio 2017, which has different steps. please following the following steps.
File -> New -> Project -> Extensibility -> VSIX project -> Change project name as you want -> OK
right click the project -> Add -> New Item -> Extensibility -> visual studio package -> change item name as you want -> Add
right click references -> add reference -> Browse... -> add the following dll to your project C:\Program Files\Common Files\microsoft shared\Team Foundation Server\15.0\Microsoft.TeamFoundation.Controls.dll
add the class named SampleTeamExplorerNavigationItem
And the following sample for your reference.
https://1drv.ms/u/s!AlvaNEnglADDgRL2bSgNqDz2Z-ga

Remove .pdb file on Visual Studio 2013?

When I compile a .sln file with Visual Studio 2013 a .pdb file is generated. How can I disable the creation of the .pdb file?
I found it.
Project -> Properties -> Build
Last category there is Output, click the Advanced button and the Debug info should be none.
In Project Properties see "Configuration Properties -> Linker -> Debugging -> Generate Debug Info".
Also see:
PDB Files - What are they and how to generate them
.net - Release generating .pdb files, why?
Those are relevant to Visual Studio 2013 also. Be sure to read the stackoverflow thread since it has important information.

Force visual studio to have same include directories between debug and release mode

I was wondering if there is a way to synchronize settings for include and link directories between debug and release configurations for project/solution?
More precisely, is there any way to tell visual studio I would like project properties
C/C++ - > General -> "Additional Include Directories"
Linker -> General -> "Additional Library Directories"
Linker -> Input -> "Additional Dependencies"
to be same for debug and release configuration, or somehow efficiently/automatically forward those settings from one configuration to the other configurations? Perhaps there is any plugin/script for that, since it is only necessary to change few lines in project text file to do what I want?
I'm currently using visual studio 2005, but I think this feature should not depend too much on version of the studio, so please post answers/solutions for any version of visual studio.
Use property sheets: create a property sheet containing the common properties, then include it in each build configuration. Do everything via the Property Manager window; be careful now: any change you want to make to the common properties must be made in the property sheet, not in the project properties!

How do I add a lib file to link in Visual C++ 2010?

I've found the Additional Dependencies thing on Visual C++ 2010, but I can't seem to find any option of adding new .lib files when I go to .
I need to add wsock32.lib to link with my file, how do I make it happen?
Thanks!
Add the wsock32.lib in the text field.
Project Properties -> Linker -> Input -> Additional Dependencies.
When you click in the field, you get a ... button. Click on this button and add one library name per line. Alternatively you can write the names in the field. Separate all entries with space characters.
You can verify that it's on the command line in
Project Properties -> Linker -> Command Line.
Here is a GUI way to add a LIB file to your Visual Studio project in C and C++ Languages (for those of us who like to mouse-around like me). I did this in Visual Studio 2012. But I think it works in previous versions, as well.
Find the LIB or other file you want to add to your project in
Windows Explorer. Drag the LIB file from Windows Explorer onto
Visual Studio's Solution Explorer, to the project to which you wish
to add the LIB file. Now, you will see the file listed in Solution Explorer.
That's it! Just one step! You will not see the file in "Project Properties -> Linker -> Input -> Additional Dependencies." However, it is there hidden in the macro
%(AdditionalDependencies).
edit Additional Dependencies and puts wsock32.lib in it.
and also add the path of lib in Link->general-> additional library directories

Using WinPcap in VC++ programs

I am trying to include WinPcap library in one of my Visual C++ program and I am using Visual Studio 10 Ultimate.
In the documentation it says
To add a preprocessor definition, you
must select Properties from the
Project menu, then select C/C++ from
the list control on the left, and
under the category Preprocessor, you
must add the definition under the
Preprocessor Definitions text box.
Project -> Properties -> C/C++ -> Preprocessor -> Preprocessor Definitions-> Added WPCAP
I have performed this step successfully, then
To add a new library to the project,
you must select Properties from the
Project menu, then select Linker from
the list control on the left, and
under the category Input add the name
of the new library in the Additional
Dependencies text box.
Project -> Properties -> Linker -> Input -> Additional Dependencies -> Added wpcap.lib
Now I have problem while performing the third step.
To add a new path where Microsoft
Visual Studio will look for the
libraries, you must select Options
from the Tools menu, then Project and
Solutions from the list control on the
left, VC++ Directories, then choose
Library Files in the Show directories
for combobox, and the add the path in
the box below.
Tools -> Options -> Project and Solutions -> VC++ Directories.
Here it says VC++ Directories editing in Tools > Options has been deprecated.
Now where is this user property sheet located ? Can some one point me in a right direction?
Thanks.
It is now a project property and located in project properties -> VC++ Directories.

Resources