0

Currently in our Application is in .net 4.8 and we are using Application.UserAppDataPath to get the path for the application data of a user.

if (TestManager.Singleton.IsUnitTestActive)
        {   // Unit test is running...
            string appUserPath = Application.UserAppDataPath;
            this.Path = appUserPath.Substring(0, appUserPath.LastIndexOf('\\')) + "\\Config.xml";
        }

recently we have migrated the logic into .net Standard 2.0 to make it crossplatform.

is there any way to find the path in .net Standard

  • Does this answer your question? [C# getting the path of %AppData%](https://stackoverflow.com/questions/867485/c-sharp-getting-the-path-of-appdata). tl;dr: `Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)` for roaming or `Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)` for local. – D M Dec 10 '22 at 19:12

0 Answers0