-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Analyzer for MarshalAs usage #34831
Comments
There may be more in Of course, anything unique in those would be candidates for adding to the official doc as well. |
There is an existing P/Invoke analyzer, which could be a fitting home for some of this. Some marshalling-related items that could be reasonable rules from the guidance doc:
|
@elinor-fung Here is another issue that should get a rule: #9944 |
Some initial thoughts:
|
@elinor-fung Is this aggregated issue being handled by the various other issues being filed or should we keep this one open? |
Closing this and using #37039 as the tracking issue that will point to the separate issues we file for each rule. |
Defining how types should be marshaled via a P/Invoke or COM interop is difficult to get correct and many bad practices have been developed over the years. The Native interoperability best practices page should be converted into an analyzer to help developers do the right thing.
Related to #33808
Additional thoughts:
ComImport
should be scrutinized./cc @terrajobst @jkoritzinsky @elinor-fung
The text was updated successfully, but these errors were encountered: