Visual studio code analysis for generated files

孤街浪徒 提交于 2019-12-10 20:25:08

问题


Can somebody tell me why code analysis shows issues from generated files? I do check option as here: http://msdn.microsoft.com/en-us/library/dd742298.aspx

I think it has to do with the fact that I use TT tempate with my Entity framework models. But those files have tags on them..


回答1:


Can you have your TT templates output the following into the header?

//<autogenerated/>

Or to be more specific to certain items in file:

[GeneratedCode("MyTool", "1.0")]
public partial class GeneratedModel
{
...


来源:https://stackoverflow.com/questions/6299583/visual-studio-code-analysis-for-generated-files

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