Closed riverar closed 1 month ago
Looks like I can cheat and use <CsWin32InputMetadataPaths>
instead https://github.com/microsoft/CsWin32/blob/main/src/Microsoft.Windows.CsWin32/build/Microsoft.Windows.CsWin32.props#L22, but figured I'd run this past you.
Updating the win32metadata projection is typically done with a PackageReference, which will then override the one brought in by the cswin32 dependency. But if you really want to bring in your locally built one directly, you can add a PackageReference to the public win32metadata package with ExcludeAssets="build"
to turn off its self-advertising, so you only have one win32metadata projection being proffered into cswin32.
Thanks @aarnott. Feel free to close if this is out of scope.
I think I'll improve the error reporting for this case.
Actual behavior
After adding a reference to a custom projection metadata winmd, the source generator fails with the following warning:
Expected behavior
No warning / source generation to function
Repro steps
Context
LangVersion
(if explicitly set by project): N/A