简体   繁体   中英

Visual studio code analysis for generated files

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..

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
{
...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM