2

I would like to generate dependency graph with dotnet dependensee tool but it gives me error:

Access to the path 'C:\Users\myuser\source\repos\Mysource' is denied.

I get this error for every directory I use it for and started Command Promt as administrator.

The usage of command:

dependensee "C:\Users\myuser\source\repos\Mysource" "C:\Users\myuser\source\repos\Mysource"
koviroli
  • 1,422
  • 1
  • 15
  • 27

1 Answers1

2

Hello I'm the creator of DependenSee

It seems like you've provided an existing folder path as the target file to be written.

Try writing the output to your desktop instead, for example:

dependensee "C:\Users\myuser\source\repos\Mysource" "C:\Users\myuser\Desktop\output.html"

Run DependenSee (no arguments) for all available options or refer to docs on GitHub for more info.

Madushan
  • 6,977
  • 31
  • 79
  • In other words, `outputPath` must be a file, not a path. – Kevin Krumwiede Apr 12 '23 at 16:31
  • file system paths can point to files or folders/directories. Since this is writing a single file, it is expected to be a path to a file. Admittedly this error message isn't great. Dotnet File APIs tries to write a file with that name, which gets denied since there's a folder by that name. I'm looking into adding a clearer message in a future version, as [a few people ran into this issue](https://github.com/madushans/DependenSee/issues/31). – Madushan Apr 13 '23 at 03:56
  • I'd rename the option to indicate that it requires a file path, not a directory path. – Kevin Krumwiede Apr 13 '23 at 19:06
  • I'd argue it doesn't explicitly require a directory. Renaming the args also breaks existing integrations, especially ones that are running as part of CI builds, so this can at best be considered at the next major version release. (I'm not keen on keeping 2 arguments for back compat). To your point, since the source arg is called `SourceFolder`, it would make sense call it `OutputFile` as well. Generally I think a good error message would suffice, since in typical usage, that would guide to the right path. Either case, I'll consider this in the next major version release. – Madushan Apr 15 '23 at 03:15