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

System.UnauthorizedAccessException: Access to the path is denied #544

Open
smaybius opened this issue Apr 27, 2024 · 2 comments
Open

System.UnauthorizedAccessException: Access to the path is denied #544

smaybius opened this issue Apr 27, 2024 · 2 comments

Comments

@smaybius
Copy link

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

@smaybius
Copy link
Author

Or with the trailing slash, I get the System.IO.DirectoryNotFoundException instead, even if that directory perfectly exists.

@tannergooding
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants