建設ASP.net的網站時收到錯誤:ASP.net生成錯誤:標識符「__ASP」是不符合CLS
Identifier '__ASP' is not CLS-compliant
無處在我的代碼是有標識__ASP
。
i know why
__ASP
is not CLS-compliant (it starts with an_
). What i need to figure out who is emitting it, and how either:
- change it to not start with an underscore, or
- make it private
i could also stop marking the assembly as CLSCompliant - but i'm not gonna
警告沒有列出任何有用的文件:
4d48b87d\63ccbbb9\App_Code.x0tl4q2v.49.cs line 15
這是很明顯,不是一個文件我創建。我怎樣才能確定這個標識符的位置,並將其刪除,或將其設爲私有?
我是沒有遇到__ASP問題的唯一的人:
- Removing the "warning CS3008: Identifier '__ASP' is not CLS-compliant" warning
- warning CS3008: Identifier '__ASP' is not CLS-compliant
共享代碼包含'CLSCompliant'屬性。如果網站沒有標記「CLSCompliant」屬性,則這些屬性會引發錯誤。但是我現在意識到,僅僅因爲我***擁有'[CLSCompliant]'屬性,它不會被*** ['CLSCompliant(true)]'。我將它改爲'[CLSCompliant(false)]',現在就可以使用。瞭解ASP.net本身不符合CLS(有助於證明禁用合規性)很有用。 – 2012-07-13 01:48:55