开发者

DataSet Classes generated by xsd.exe generate a huge number of warnings

I've got several hundred warnings due to missing xml comments from a single DataSet generated from a single .xsd file. Since this is an auto generated file manually editing them isn't a good idea. Is there any way to either disable the warning for the file (CS1591) or put values that will be imported into xml 开发者_如何学编程comments into the xsd file?


The normal way to disable warnings for a class in a particular file is to use the pragma warning preprocessor directive, but as you said, you don't want to manually edit an auto-generated file.

Since these are partial classes, I thought you might be able to disable the warning by creating another file to extend it and applying the directive there, but that doesn't work - pragma directives only apply to the file in which they appear.

I think your only option is to live with the noise or suppress the warning at the project/assembly level (from the project properties 'Build' tab, under 'Errors and warnings')

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜