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

ModelText() returns System.IO.DirectoryNotFoundException when run in Notebook #1085

Open
daniel-fink opened this issue May 15, 2024 · 0 comments

Comments

@daniel-fink
Copy link

daniel-fink commented May 15, 2024

In dotnet Interactive/Polyglot Notebooks, constructing a ModelText yields the following error:

Error: System.IO.DirectoryNotFoundException: Could not find a part of the path '/Users/daniel/.nuget/packages/hypar.elements/2.2.0-alpha.25/lib/netstandard2.0/Fonts/Roboto-Medium.ttf'.

Looks like this is because (at least on macOS), dotnet/nuget places reference content into two places under the package version (ie in '~/.nuget/packages/..'):

  1. a '../content/..' directory, or
  2. a '../contentFiles/any/framework/..' directory

See https://learn.microsoft.com/en-us/nuget/reference/msbuild-targets#including-content-in-a-package where Microsoft states "By default, everything gets added to the root of the content and contentFiles\any<target_framework> folder within a package and preserves the relative folder structure, unless you specify a package path"

I think this will directly affect

var fontPath = Path.Combine(asmDir, "Fonts/Roboto-Medium.ttf");
but I'm not sure if/where else..

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

1 participant