Closed TheRealColeB closed 5 months ago
Hey @colebtest, I wrote that post. Any/all feedback is greatly appreciated.
This is a common gotcha. For better or worse, the build tooling quietly drops functions that cannot be mapped to dlls. If you don't have an import lib for TestApi
that you can feed into the tooling, you can manually associate the two.
Assuming you're using the structure outlined in the blog post, create or modify options.rsp
in your .metadata
directory and add:
--with-librarypath
TestApi=Test.dll
Thanks @riverar! I was able to use that option to get past this hurdle. I will probably have more questions as I make more progress, but I'll close this issue now.
I'm trying to generate winmd for my own api. Right now I'm just testing the waters by following the pattern in the post by Rafael (https://withinrafael.com/2023/01/18/generating-metadata-for-the-windows-crate), and applying it to generate a winmd for a simple header that just contains
But when I generate the winmd and look at it in ILSpy, the TestApi entry point is missing. I found that I can see the TestApi entry point in the intermediate file obj\generated\x64\Test.cs:
But there is another file, obj\generated\obj\crossarch\x86\Test.modified.cs, in which the expected api is missing:
Can someone point me to where I may be going wrong here?