This project will allow you to create custom attributes with warning
Internally there is a file called IDEMessageAttribute which is used for the example, extract that to a seperate dll, and install the vsix Extension and it will provide a new analzer for your project to throw warnings.