Running exe path

Dani_S 3,786 Reputation points
2024-07-07T11:27:20.5766667+00:00

Hi,

How i get the running exe path of maui app in NET 8?

Thanks,

In run time in code? AppContext.BaseDirectory? or AppDomain.CurrentDomain.BaseDirectory?

I got:

D:\Applications\GssdDesktopClient\GssdDesktopClient.Maui\bin\Debug\net8.0-windows10.0.19041.0\win10-x64AppX\

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,599 questions
{count} votes

Accepted answer
  1. Bruce (SqlWork.com) 66,706 Reputation points
    2024-07-07T16:24:38.37+00:00

    .net core includes the AppDomain class for compatibility with older code, but did not implement its isolation features. In core there is only the .Current domain (one domain).

    if new code you should use AppContext.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.