I am using F# and i found that the available templates were a bit to sparse for my liking, and i want to make more. How would i go about doing that? also, how would i install these templates after I've made them?
相关问题
- How does the setup bootstrapper detect if prerequi
- How to know full paths to DLL's from .csproj f
- Importing NuGet references through a local project
- Visual Studio 2019 - error MSB8020: The build tool
- 'System.Threading.ThreadAbortException' in
相关文章
- How to show location of errors, references to memb
- Log4Net Multiple Projects
- Getting errors / failing tests when installing Pyt
- How to track MongoDB requests from a console appli
- How do you make an installer for your python progr
- Compiling error in C++ project with C and C++ code
- Visual Studio Hangs on Loading UI Library
- How to use Mercurial from Visual Studio 2010?
Here's the MSDN article for templates. Hopefully it is similar:
http://msdn.microsoft.com/en-us/library/6db0hwky.aspx
I'd try http://msdn.microsoft.com/en-us/library/ms185291.aspx - it seems like a good starting point, at least.
You can get the complete example implemented here: Multi-Project Templates with Wizard: Visual Studio 2010 Sample
I was missing SharePoint 2010 and MOSS 2007 templates in Visual Studio 2010 development tool after my SharePoint installation. I reinstalled VS and found they were available. It looks like during installation of SharePoint pre-requisites for some reason I missed those templates from getting installed.
I ran into problems with this and multiple custom templates. Each template (e.g. vstemplate + cs file) should be in it's own zip file. If you put several into the same zip it won't pick up any of them.
I also found that if you put them in:
$My Documents$\Visual Studio 2010\Templates\ItemTemplates
then you wont need run the command (devenv /installvstemplates) mentioned by Brett. Presumably this is only when modifying the existing ones in the install folder.
Here's a sample that I use for knocking up NUnit tests:
Code file (with .cs/relevant extension):
Template file (with .vstemplate extension):
In Visual Studio's path you will find the default templates, these are a set of zip files that get expanded into the template cach.
They are stored in
%VSInstallDir%\Common7\IDE\ItemTemplates\
%VSInstallDir%\Common7\IDE\ProjectTemplates\
Extracting the {{.zip}} in question and recompressing with the modified contents will update the template. You can also copy these files to one of the respective template folders in
%USERPROFILE%\Documents\Visual Studio 2010
.For information on building templates have a look at Visual Studio Templates on MSDN.
You then need to tell VS to rebuild the cache.
devenv /installvstemplates
You can also use the "Export Template..." wizard from the file menu, however the exported template loses original content such as
if
statements.