Running exe path

Dani_S 3,316 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,206 questions
{count} votes

Accepted answer
  1. Bruce (SqlWork.com) 61,181 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