清除 Visual Studio 2010 中的自定义工具文件属性

问题描述:

是否有任何方法可以防止自定义工具运行或删除 Visual Studio 中每个项目的文件类型的自定义工具?在我的示例中,我想向我的项目中添加一个扩展名 (.tt) 的文件,Visual Studio 将其与 TextTemplatingFileGenerator 关联.我不想进入文件属性并清除自定义工具属性,也不想清除在将文件添加到我的项目时运行的单个文件生成器所做的任何工作.

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.

在出现文件的 .csproj 文件中,您可以将 Generator 设置为空.

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