Sharing Visual Studio code snippets amongst a team of developers - visual-studio

Has anyone come up with a good way to share a set of Visual Studio Code Snippets (actual .snippet files that Visual studio uses) amongst a team of developers automatically? It would be great for other developers on my team to benefit from shortcuts I've created for myself, and vice versa.

I know this post is very old, but I found another good way (IMO) for sharing snippets, maybe in addition to the solution #Kevin Dente provided: using git!!
I shared successfully snippets and project templates creating an ad hoc git repository named snippets.git, I cloned it into the MyDocuments\Visual Studio 2015\Code Snippets folder and now I can add, edit or delete snippets from MyDocuments\Visual Studio 2015\Code Snippets\Visual C#\My Code Snippets (or Visual Basic folder), then commit and push to make them available to all other team members with the same configuration.
The principle is applicable also to the project templates, you can create a templates.git repository and clone it to the MyDocuments\Visual Studio 2015\Templates folder, then create the templates under the MyDocuments\Visual Studio 2015\Templates\ProjectTemplates\Visual C# folder (or Visual Basic folder).
This way the developers can periodically pull the two repositories and have up to date snippets and templates, available almost everywhere the git server is reachable (anyone said github? or bitbucket?).
Of course I am using Visual Studio 2015, but the method can be used with previous and, I think, future versions of Visual Studio.

It's 2018 now and the VS Code team has added this feature (currently in preview)
See this ticket for more info

Related

How to pull new files from github to Visual Studio?

I'm new to developing on Windows and getting frustrated with how non-intuitive Visual Studio feels compared to Eclipse. Here's where I'm at:
I created a local VS project, and wrote some code.
I pushed the code to github via the built-in source control options. No problems, source is all there.
My collaborator made new files, and commited them to github. Those are up and live.
I pulled from github, but I don't see the files anywhere in my solution. Where are they? How can I get them to automatically add to my VS project?
How do I pull ALL files on github into VS without having to manual download them and add them to my solution? Visual Studio version is 2019 Community edition.
--EDIT--
I finally found them by switching my solution explorer to the project's folder view using the "Switch Views" button at the top of the solution explorer pane. How do I add these to the solution view?
The concept of having a "solution" completely abstracted from the actual file contents is... strange. I think I'm just going to back to Eclipse. I want to like VS because of vast amount of content in it, but the user experience has been a much more hostile learning environment.
This is not a problem with Windows nor Visual Studio; this is a Git issue.
here are some steps to follow:
make sure that you are pushing to the same branch. checkout this link
if you are pushing into different branch make sure that you do rebasing. checkout this link

How to use symbolic links in Azure DevOps on Window (Visual Studio 2019 Team Explorer)

Imagine I have three team projects, one is a library and the other two use it:
C:\BaseLibrary
C:\ProjectOne
C:\ProjectTwo
Now imagine that I have a tsconfig.json in my base library, and I want to add symbolic links to it in the other two projects.
However, I run into this problem that Azure DevOps client which is called Team Explorer in Visual Studio 2019 doesn't understand it's a symbolic link, and on the next get latest version in another developer's machine, it copies a real copy to the hard that is not a link to the original file.
How to solve this issue?

visual studio solution organization

I'm trying to get my head around how to best organize my companies code set in visual studio 2013 TFS-git. We have multiple database projects and multiple web application projects. I like the idea of being able to develop a web app and the db at the same time in a particular solution but its not a one to one scenario. Multiple web apps talk to the same databases.
I know you can break things up into solutions and projects but not seeing too much out there in best practices in this area.
Any guidance? Thanks for your help.
I think this will help you what you are trying to do
Git init VS full Git support into all their ALM products. Here they have published for Visual Studio that adds Git source control integration. Git Extension includes add-ins for Older Visual Studio versions and Windows Explorer integration. It's regularly updated. And alternatively you can look for Git Source Control Provider
And you may also a read about TFS-GIT here

How to specify the source control plugin on a per-solution basis in Visual Studio?

I just installed AnkhSVN to have subversion support from within Visual Studio 2010.
I noticed I had to go to Tools > Options > Source Control to select the current source control plugin.
At the moment, I'm working on multiple projects using different version control systems. For instance, I also have some projects in Mercurial, for which a VS source control plugin is available.
Is there any way to specify the source control plugin on a per-solution basis? Or can VS detect the used vcs automatically? What are the best practices in this respect?
Edit: a google search led me to How to configure Visual Studio to use different source control providers and Can Perforce and SourceSafe co-exist in Visual Studio?. Both cover the same ground, but appear to be specific to specific vcs and lack a satisfying general answer. I'm looking for a general answer here.
There is unfortunately no good answer here. You will simply have to go in and manually change you visual studio source control provider settings before you open the project. This is a limitation of how this particular plugin system works, and will probably take a new version of visual studio to specifically address it.
This is an instance where visual studio works better for the enterprise shop with standardized source control tools, and not as good for a contractor working with multiple clients across an array of technologies.
Source control provider auto switching based on reserved directory presence can be done with a VS extension as described here.

Project management with Visual Studio, without TFS?

Can I have some basic project management in Visual Studion without TFS or is TFS what I need?
Basically I like to get a list with my projects, last edited dates, and if possible project tags (customer for example), and when selecting one VS should load it. From the right repository (Mercurial/Git/Svn). I can move my project to some repo host if they have this solution (Addon).
At the moment I handle the projecs manually with Windows standard folders + SVN/Hg in folder context menu, and thats a headache.
Thank you
As far as I know Visual Studio doesn't support that functionality natively.
TFS isn't my forte but I know it comes with MSDN subscriptions and the retail version is around $500 if that is the path you are interested in. If you do go the TFS route you have an option to use TFS Basic during install which is a greatly simplified install of TFS that can even use SQL Express.
You can check out pricing and download the trial from here if you want more info:
http://www.microsoft.com/visualstudio/en-us/products/2010-editions/team-foundation-server

Resources