How to add existing Template to Visual Studio? - visual-studio

Particularly for VS.NET 2013, how do you add a template? I've created a custom template. VS.NET adds it to \Libraries\Documents\Visual Studio 2013\Templates\ItemTemplates. I'd like to know import that template into VS.NET on a different machine.
When I rename the zip template in the above location, that name doesn't show up in the add new item dialogue box in VS.NET. Are there any steps for adding a template?

Maybe you can add the template to [Visual Studio installation path]\Common7\IDE\ItemTemplates\ of the other machine.
And then run the command devenv /installvstemplates in your Developer Command Prompt
Source:
http://msdn.microsoft.com/en-us/library/ms241279.aspx

Related

How to change icon of file based on file type in Visual Studio Extension

ITNOA
I have a GitHub project for Visual Studio Ansible extension, in this extension I want to change icon of ansible file in Visual Studio (.ansible and .ansible.yaml) based on file extension, but I do not know How to do it?
Anybody know to How to do it?
I write extension for Visual Studio 2022
related to https://github.com/MicrosoftDocs/visualstudio-docs/issues/8966#issue-1588941743
Updated 2/17/2023
I think it is related to https://learn.microsoft.com/en-us/visualstudio/extensibility/internals/manifest-from-resources?view=vs-2022
and based on How to add custom icons to solution explorer in Visual Studio I try to add resources and image manifest, but my file display void instead of display correct icon, and I do not know my mistake
I update source code, that you have see it https://github.com/soroshsabz/visualstudio-ansible/tree/features/5-add-syntax
related to https://developercommunity.visualstudio.com/t/New-icon-for-custom-file-type-is-not-d/10283644
thanks

Visual Studio TFS add-in branch context menu

How can I add a custom entry to the context menu of a branch in the Source Control Explorer of TFS?
To add context menu options you need to create an entry in a Visual Studio Command Table file. The simplest way to do this is to create a new extensibility project (you need to install the Visual Studio SDK first) - this has an example of how to add a custom command to an existing menu.
For more about vsix and vsct extensibility check:
https://msdn.microsoft.com/en-us/library/bb164699.aspx
I also found this blog useful:
http://dotneteers.net/blogs/divedeeper/archive/2008/04/17/LearnVSXNowPart18A.aspx

VS2013 create new class from template

Hi is this possible to create some template for Visual studio, that when I create new class it will contains some description in header ?
On Visual Studio 2012 you could do something like this:
Find the files
C:\\Microsoft Visual Studio 11.0\Common7\IDE\ItemTemplates\CSharp\Code\1033
The file you want is in an appropriately named folder. If you open the Class folder you will find the following 2 files:
Class.cs
Class.vstemplate
Backup the original files
Change the Class.cs template file
Save your changes
Tell Visual Studio about the changes
Your new changes will not be loaded unless you explicitly tell Visual Studio to reload all templates.
Close Visual Studio (or the change swill not show until next time you run it)
Open a command prompt (you should run this as Administrator if you are not an admin of the machine).
Change to the IDE folder a few levels above the template folder (e.g. to C:\\Microsoft Visual Studio 10.0\Common7\IDE)
Run the following command:
devenv.exe /installvstemplates

Umbraco and Visual Studio 2013 is out of sync

I just got my VS 2013 to run together with Umbraco 7, but i just ran into a poroblem. When i for example create a template inside Umbraco i cant see this newly created template inside of visual studio, but i can see that it exsists in the folder together with all the other templates. And ther eare the same problem countervise when i careate a usercontrol in VS i cant see it inside umbraco, are there any way to make them work in sync?
Or maybe there are some other ways to get intellisence help for umbraco instead of VS IDE?
You just need to click on "show all files" and then you'll be able to see it and include in in your project.

Visual Studio 2010 RC is missing installed WPF Templates for certain project

only with a certain .Net 4.0 project I can not add a new Window item to my project in the solution explorer. In the installed Templates for WPF there is only the UserControl ?
What happened?
edit: In that direcotry => C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ItemTemplates\CSharp\WPF\1033
I can see all the wpf templates... so why aren`t they all shown in the WPF=>Installed Templates section?
I have done in the command shell with admin rights devenv /resetsettings, devenv /setup, devenv /installvstemplates and I reassigned the project templates/item templates path to the above itemTempaltes path and analog to the ProjectTemplate path where I could see all templates.
Nothing worked!?
They don't appear because of your project type.
The solution, to quote CoolDadTx:
If you select a WPF Custom Control or WPF User Control library then you should see the options. If you use any other type of library then they don't show up as an option. It isn't that you can't use them, just that they don't show up.

Resources