dotnet / pinvoke

A library containing all P/Invoke code so you don't have to import it every time. Maintained and updated to support the latest Windows OS.
MIT License
2.12k stars 222 forks source link

Method overload codegen drops [Obsolete] attribute #248

Closed AArnott closed 8 years ago

AArnott commented 8 years ago

When a P/Invoke method has an [Obsolete] attribute on it, any code-gen overload methods should retain that attribute. They are currently dropped.

Also, when the code-gen'd methods call the original P/Invoke, they produce warnings due to calling an Obsolete method. This should be fixed by suppressing the warning around this code.

As found in #247's SHGetFolderPath method.