Clearing Custom Tool file property in Visual Studio 2010

白昼怎懂夜的黑 提交于 2019-12-08 13:50:18

问题


Is there any way to prevent prevent a custom tool from running or remove the custom tool for a file type per project in Visual Studio? In my example I would like to add a file to my project with an extension (.tt) that Visual Studio assoicates with the TextTemplatingFileGenerator. I would like to not have to go into the file properties and clear the Custom Tool property as well as clean up any work done by the single file generator that runs when adding the file to my project.


回答1:


In the .csproj file where the file appears you can set Generator to be empty.




回答2:


If you want to turn off the automatic assigning of the custom tool property to .tt files, you can delete the registry key below: (usual caveats about backing up your registry before hacking apply)

The guid is for the C# project system - browse the other guids that are its peers for the VB project system.

32-bit HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\10.0\Generators{FAE04EC1-301F-11D3-BF4B-00C04F79EFBC}.tt

64-bit HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\Generators{FAE04EC1-301F-11D3-BF4B-00C04F79EFBC}.tt



来源:https://stackoverflow.com/questions/4372567/clearing-custom-tool-file-property-in-visual-studio-2010

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