System.UnauthorizedAccessException: Access to the path is denied
When I try outputting to a folder that's created in Visual Studio, whether it's in the command line or as an msbuild event, it says access to that folder is denied.
ClangSharpPInvokeGenerator -n MiniAudioSharp -f extern/miniaudio/miniaudio.h -o libs/bindings/Miniaudio --include-directory $VCINSTALLDIR\Tools\Llvm\lib\clang\17\include
Or with the trailing slash, I get the System.IO.DirectoryNotFoundException instead, even if that directory perfectly exists.
The issue here is that the tool defaults to single-file output and so -o libs/bindings/Miniaudio fails if there is an existing folder with that name. There's probably a better diagnostic that we could give (explicitly checking if the output path exists as a folder for single-file mode or as a file for multiple-file mode).
You'll want to pass in -c multi-file (or --config multi-file) to resolve the issue