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

.net MAUI debugging -> GetCurrentDirectory() points to C:\windows\system32 #8091

Closed
vsfeedback opened this issue Jun 15, 2022 · 3 comments
Closed
Labels
platform/windows 🪟 t/bug Something isn't working

Comments

@vsfeedback
Copy link

This issue has been moved from a ticket on Developer Community.


[severity:It bothers me. A fix would be nice]
The default application start folder should not point to Windows's system folder.
That yields lot's of problems, as every other solution so far was able to create and write to local folder where it has started from debugger without any additional actions.
Unfortunately this is not the case for default .net MAUI Windows application.

To reproduce:

  1. Create new .net MAUI app from template
  2. Put the breakpoint at line 25 of MauiProgram.cs (line with return)
  3. Run the app, wait for breakpoint
  4. In the immediate Window check:
    Directory.GetCurrentDirectory()
    result: "C:\Windows\system32"

It should point to a folder where the project is, this is the developer's expectation as it was for all other types of projects.

image.png


Original Comments

Feedback Bot on 5/19/2022, 01:16 AM:

(private comment, text removed)

Feedback Bot on 5/20/2022, 08:06 AM:

(private comment, text removed)


Original Solutions

(no solutions)

@Fabi
Copy link

Fabi commented Jun 16, 2022

Can confirm that

@jfversluis
Copy link
Member

Same happens with a WinUI app and I think with any Windows based app. It's probably different when you distribute the actual app or set the working directory when starting it. At the very least, this is not something caused from within .NET MAUI.

image

@jfversluis jfversluis closed this as not planned Won't fix, can't repro, duplicate, stale Jun 16, 2022
@Fabi
Copy link

Fabi commented Jun 16, 2022

Same happens with a WinUI app and I think with any Windows based app. It's probably different when you distribute the actual app or set the working directory when starting it. At the very least, this is not something caused from within .NET MAUI.

image

This is a WinUI caused behavior then. This does not happen on other apps like WinForms or WPF. Or any other non packaged app format (Not sure if its related to that)

@ghost ghost locked as resolved and limited conversation to collaborators Jul 16, 2022
@samhouts samhouts added platform/windows 🪟 t/bug Something isn't working labels Feb 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
platform/windows 🪟 t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants