Skip to content

WPF Store application failed to loads the output directory files due to wrong current directory #43126

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

Closed
mageshsankar opened this issue Oct 7, 2020 · 4 comments
Labels
area-System.IO question Answer questions and provide assistance, not an issue with source code or documentation.

Comments

@mageshsankar
Copy link

Description

I have published WPF application in Store SampleBrowser, and it fails to load an document file(Books.xml - Build Action : Content, Copy to output directory: Copy Always) so application crash on loading xml document. Please find the below code how we have loaded xml document and exception screenshot below:

XDocument xDocument = XDocument.Load(@"Assets/TileView/Books.xml");

image

@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added area-System.IO untriaged New issue has not been triaged by the area owner labels Oct 7, 2020
@jaymin93
Copy link
Contributor

jaymin93 commented Oct 7, 2020

It seems you are running this on arm Machine ( my assumption) but regarding the issue you have not supplied full path that's reason it's generating exception you may get path of executables using assembly.getexecuting assembly.location and then file name it should work fine

@carlossanlop carlossanlop added the question Answer questions and provide assistance, not an issue with source code or documentation. label Oct 9, 2020
@carlossanlop
Copy link
Contributor

Have you tried passing the full path of the file to XDocument.Load? Otherwise, Load will internally assume the file's root prefix path should be the location of wherever the executing process is (although I'm not sure why C:\Windows\SysWOW64 is showing up as the executing process location).

@carlossanlop carlossanlop added area-Meta area-System.IO and removed area-System.IO untriaged New issue has not been triaged by the area owner area-Meta labels Oct 9, 2020
@carlossanlop carlossanlop added this to the Future milestone Oct 9, 2020
Copy link
Contributor

Due to lack of recent activity, this issue has been marked as a candidate for backlog cleanup. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will undo this process.

This process is part of our issue cleanup automation.

@dotnet-policy-service dotnet-policy-service bot added backlog-cleanup-candidate An inactive issue that has been marked for automated closure. no-recent-activity labels Apr 11, 2025
Copy link
Contributor

This issue will now be closed since it had been marked no-recent-activity but received no further activity in the past 14 days. It is still possible to reopen or comment on the issue, but please note that the issue will be locked if it remains inactive for another 30 days.

@dotnet-policy-service dotnet-policy-service bot removed this from the Future milestone Apr 25, 2025
@github-actions github-actions bot locked and limited conversation to collaborators May 25, 2025
@dotnet-policy-service dotnet-policy-service bot removed no-recent-activity backlog-cleanup-candidate An inactive issue that has been marked for automated closure. labels May 25, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.IO question Answer questions and provide assistance, not an issue with source code or documentation.
Projects
None yet
Development

No branches or pull requests

4 participants