2013-10-31 34 views
2

我有一個從服務引用生成的接口。該接口缺少XML註釋,所以我得到警告(在我的VS配置中被處理爲錯誤)。 如何從警告中排除此接口?排除生成的接口中的XML註釋

+0

什麼語言? C#? VB.net? –

+0

C#與.NET 3.5 –

回答

0

看看這個MS論壇的問題的討論:

http://social.msdn.microsoft.com/Forums/en-US/9bbad4cc-e229-49da-a6f7-3cdf470ac53a/compiler-warning-for-missing-xml-comment-when-i-have-generated-code?forum=devdocs

彙總(讀:複製粘貼-N-)一些來自線程可能的解決方案:

如果你不打算經常重新生成此文件,或者在所有的,你總是可以只打開reference.cs文件,並添加#編譯的對自己的文件的頂部和底部:.. edit the Reference.cs file itself and add "#pragma warning disable 1591" at the top and "#pragma warning restore 1591" at the bottom.

+0

謝謝,訪問級別設置爲我工作! –