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

use <PublishSingleFile>true</PublishSingleFile> not found directory name. #44

Closed
juner opened this issue Feb 14, 2023 · 2 comments
Closed
Assignees

Comments

@juner
Copy link

juner commented Feb 14, 2023

It works fine when I debug it, but when I publish it and run it, it doesn't work.

As far as I can see the source, here I am getting DirectoryName from Location

return Path.Combine(
Path.GetDirectoryName(
(Assembly.GetEntryAssembly() ?? Assembly.GetExecutingAssembly()).Location),
utilName);

Shouldn't it fall back to AppContext.BaseDirectory if the Location return value is an empty string?

see dotnet/corert#5467

sample project: /~https://github.com/juner/PdfToPrinterNotWorkSample_20230214

@svishnevsky svishnevsky self-assigned this Feb 20, 2023
svishnevsky pushed a commit that referenced this issue Feb 21, 2023
svishnevsky added a commit that referenced this issue Feb 21, 2023
#44 use AppContext.BaseDirectory as a main util location
@svishnevsky
Copy link
Owner

Hi @juner
Thanks for reporting the issue. Could you please try version 1.5.0 and let me know if it helped?

@juner
Copy link
Author

juner commented Mar 16, 2023

@svishnevsky
it worked fine
Thank you very much! !

@juner juner closed this as completed Mar 16, 2023
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