Skip to content
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

__char_260 (e.g.) is emitted in referenced projects, results in compilation failure #918

Closed
AliveDevil opened this issue Apr 17, 2023 · 1 comment · Fixed by #922
Closed
Assignees
Labels
bug Something isn't working

Comments

@AliveDevil
Copy link

AliveDevil commented Apr 17, 2023

Actual behavior

  • Create LibA and ConsoleB
  • Reference LibA in ConsoleB
  • LibA imports SHFILEINFOW
  • ConsoleB imports DROPDESCRIPTION
    Observe error
CS0121	Der Aufruf unterscheidet nicht eindeutig zwischen den folgenden Methoden oder Eigenschaften: "Windows.Win32.InlineArrayIndexerExtensions.SliceAtNull(System.ReadOnlySpan<char>)" und "Windows.Win32.InlineArrayIndexerExtensions.SliceAtNull(System.ReadOnlySpan<char>)"

Expected behavior

CsWin32 shouldn't emit __char_260 in dependent projects, nor create InlineArrayIndexerExtensions, if already exists.

Repro steps

  1. NativeMethods.txt content:

LibA:

SHFILEINFOW

ConsoleB:

DROPDESCRIPTION
  1. NativeMethods.json content (if present):
{
  "$schema": "https://aka.ms/CsWin32.schema.json",
  "public": true
}
  1. Any of your own code that should be shared?
    repro.zip

Context

  • CsWin32 version: 0.2.206-beta
  • Target Framework: net7.0
@AliveDevil AliveDevil added the bug Something isn't working label Apr 17, 2023
@AArnott
Copy link
Member

AArnott commented Apr 17, 2023

Thank you for the excellent report and repro.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants