Generator project for Microsoft.Web.WebView2.Win32.winmd, using the out-of-tree SDK for win32metadata.
Install the dotnet CLI if you don't already have it.
Note
although it's a Visual Studio project, the Visual Studio build won't work
So, clone this repo and run the following command from the repo root:
> dotnet buildThe build may take a few minutes, but when it's done the winmd file should be in bin\Microsoft.Web.WebView2.Win32.winmd.
Tip
Make sure the ClangSharpPInvokeGenerator dotnet tool is not installed globally. If it is, it's version may be too high and the build may fail with a "error CS0246: The type or namespace name 'NativeAnnotation' could not be found" error.
When new versions of the WebView2 SDK are released, you can update the version used to build the metadata by updating this version number in WebView2Win32Metadata.proj:
<WinmdVersion>1.0.3537.50</WinmdVersion>