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

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

Related

Cross-Platform/Xamarin/VS: class exists in .IOS but not .Android and .UWP

In a Visual Studio 2017 cross-platform project, which I mostly based on the integrated Visual Studio example, I added a page .xaml + .cs files.
This page's class exists in the projects
"MyProject" and "MyProject".iOS
but is not known by
"MyProject".Android and "MyProject".UWP
What am I missing ?
Edit: I forgot this precision: I'm trying to build the project from 'Projec'>Store>Create App Packages ... if instead I Re-build, Re-deploy, Run, the project runs.

xamarin -> Visual Studio Community edition 2015 -> where is the shared project library template?

I am using Visual Studio 2015 Community Edition with Xamarin.
I have a Xamarin forms project. I now want to test adding a PCL and a shared library.
I can see that the Solution -> Add -> New Project, shows me some templates.
Listed here is a Class Library (Xamarin Forms) which must be the PCL.
What I want to know is where is the Shared Class Library.
Xamarin Studio for iOS appears to show these differently. I have a choice of creating a PCL or a shared library under a "Library" menu item.
With Visual Studio, it is a lot more confusing.
I can clearly see that there are templates for brand new projects for Blank App ( Portable ) and Blank app Shared, but this is not what I want. What I want is a library ( shared ).
Where is this template?
You can find Shared Project Library template by going to File -> New -> Project -> Templates -> Visual C# -> Blank App (Native Shared)
There are two ways to do this:
Step 1: Right Click on the solution -> Add -> New Project -> Click on the visual C# template -> Click on the Shared Project -> Name it.
Step 2: If you want more ease then on the Cross platform template you can opt for the Blank App(Shared) template it'll create all the three projects along with shared project.

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.

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

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

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