Visual Studio Custom Project Template

会有一股神秘感。 提交于 2021-02-07 09:44:07

问题


I have created a Custom C# Project Template for Visual Studio 2008. It works perfect. Only issue is that i have to place the zip file for the project template under the "C:\Documents and Settings\\My Documents\Visual Studio 2008\Templates\ItemTemplates\Visual C#"

Now as this folder is specific to each user on the machine, I will have to make sure that all the users on the machine has the project template installed seperately. Is there any way I can just install it once and all the users can get this project template.

In short can I change the Custom Project template Install directory?


回答1:


Put your template in a shared network location.

Then In Tools/Options/Projects and Solutions/General/User project templates location, each developer should put the path to that folder, e.g. Z:/Visual Studio Templates/.

If you don't have a shared server you can use something like Dropbox to achieve the same effect.




回答2:


Try the C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ProjectTemplates / ProjectTemplatesCache directory.

EDIT: Also, you can change the user project templates location in the Options dialog under Projects and Solutions -> General, however I believe these settings are per-user anyway.




回答3:


I prefer adding my templates in a VisualStudio\Templates folder in my source code under version control and then asking all my colleagues to change their "User project templates location," which is specified in the Projects and Solutions section of the Visual Studio Options dialog to point to this location. Then I'll have:

  • Everybody gets the new templates when they update from source control.
  • My templates are versioned with respect to change tracking and introduced bugs etc.
  • My templates are tied to the respective version of my product.


来源:https://stackoverflow.com/questions/1420846/visual-studio-custom-project-template

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!