-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Strange error message from LibraryImport #69827
Comments
Tagging subscribers to this area: @dotnet/interop-contrib Issue DetailsCompiling: using System.Runtime.InteropServices;
Console.WriteLine(Interop.MyFunction());
partial class Interop
{
[LibraryImport(Abc)]
internal static partial int MyFunction();
} errors with the message: That's a very strange error message 😄 Do we even need a diagnostic in this case? It's not going to compile, anyway, as the C# compiler itself also issues "error CS0103: The name 'Abc' does not exist in the current context".
|
We technically don't need a diagnostic. I'd be okay with removing it. |
Agreed - we should just remove. |
… the attribute. The C# compiler will already fail so just let it emit its diagnostics. Fixes #69827
Compiling:
errors with the message:
"The 'Invalid syntax' configuration is not supported by source-generated P/Invokes."
That's a very strange error message 😄
Do we even need a diagnostic in this case? It's not going to compile, anyway, as the C# compiler itself also issues "error CS0103: The name 'Abc' does not exist in the current context".
The text was updated successfully, but these errors were encountered: