Excel-DNA / Excel-DNA/ExcelDna

AppContext.BaseDirectory returns empty string in .Net 8 or 9

Open
#757 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
1.5k
Forks
292
Avg merge
20d 12h
Merged PRs (30d)
1

Description

the ExcelDna version is 1.8 or 1.9, the project uses AppContext.BaseDirectory to get the application directory, in the net framework , it works fine . But in Net 8 or 9 , it alwarys returns empty string. In fact, not only AppContext.BaseDirectory , but also AppDomain.CurrentDomain.BaseDirectory, Assembly.GetExecutingAssembly().Location are the same.

![Image](https://github.com/user-attachments/assets/79c3022e-e6a2-4976-ac0f-5a16968844a6)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.