Is there a way to modify the default template for new pages so that it includes my custom 'using' statements?
有没有办法修改新页面的默认模板,以便它包含我的自定义“使用”语句?
1 个解决方案
#1
1
From Steve's blog, it suggests that you edit the Class.cs file located in:
从Steve的博客中,它建议您编辑位于以下位置的Class.cs文件:
%Program Files%\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplates\CSharp\Code\1033\Class.zip
Be sure to regenerate the template cache by running:
确保通过运行以下命令重新生成模板缓存:
%Program Files%\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe /setup
Make sure you wait for the process to exit (watch your task manager!).
确保等待进程退出(观察任务管理器!)。
Web templates are in a different zip:
Web模板使用不同的zip:
%Program Files%\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplates\CSharp\Web\1033\WebForm.zip
#1
1
From Steve's blog, it suggests that you edit the Class.cs file located in:
从Steve的博客中,它建议您编辑位于以下位置的Class.cs文件:
%Program Files%\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplates\CSharp\Code\1033\Class.zip
Be sure to regenerate the template cache by running:
确保通过运行以下命令重新生成模板缓存:
%Program Files%\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe /setup
Make sure you wait for the process to exit (watch your task manager!).
确保等待进程退出(观察任务管理器!)。
Web templates are in a different zip:
Web模板使用不同的zip:
%Program Files%\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplates\CSharp\Web\1033\WebForm.zip