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

OpenFilePicker example code hangs, never produces picker #502

Closed
EvanHutnick opened this issue Apr 30, 2018 — with docs.microsoft.com · 1 comment
Closed

OpenFilePicker example code hangs, never produces picker #502

EvanHutnick opened this issue Apr 30, 2018 — with docs.microsoft.com · 1 comment
Assignees

Comments

Copy link

When attempting to run the code from 'Pick a single file: complete code listing' via Visual Studio, the application simply hangs and never generates a file picker.

Tested on Debug/Release, x86/x64, Admin/non admin opening of Visual Studio. Also gave file picker 'any file type' permission just in case. Currently on SDK 16299, OS Version 1709 build 17025.1000.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@laurenhughes
Copy link
Contributor

I tested this code, and it worked for me. I'm on an Insider Preview build (17655). No special permissions or admin privileges. The code is the same as what's on the page, except I added "Debug.WriteLine" instead of a text box and wrapped it into a method.

public async void TestPicker() 
{
    var folderPicker = new Windows.Storage.Pickers.FolderPicker();
    folderPicker.SuggestedStartLocation = Windows.Storage.Pickers.PickerLocationId.Desktop;
    folderPicker.FileTypeFilter.Add("*");

    Windows.Storage.StorageFolder folder = await folderPicker.PickSingleFolderAsync();
    if (folder != null)
    {
        // Application now has read/write access to all contents in the picked folder
        // (including other sub-folder contents)
        Windows.Storage.AccessCache.StorageApplicationPermissions.
        FutureAccessList.AddOrReplace("PickedFolderToken", folder);
        Debug.WriteLine(folder.Name);
    }
    else
    {
        Debug.WriteLine("Operation canceled.");
    }
}

If you're still having issues with the file picker, I'll file a bug with the product team to investigate. Thanks for bringing this up!

mijacobs pushed a commit that referenced this issue Dec 10, 2019
* Redirect deleted content-as-objects article

* Update redirect_url value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants