Store. App not correctly working installed from store RRS feed

  • Question

  • Hello,

    Looks the app not able to write files in ..\appdata\roaming\...

    I uploaded a WPF-C# app to the store with no issue. The app runs correctly from local install - clickonce and so forth - but fails if downloaded and installed from Store. The app is not able to write files and create directory to the appdata\roaming folder. I need to do so. The app is also a plugin which requires some files written in the 'motherSoft\plugin\' folder located in appdata\roaming\ folder. 

    In fact, everything right from the UI - no error - but nothing done in the appdata folder - no file, no folder created. Seems to me the app running in a virtual env when installed from store!

    May you help, please?


    Thursday, April 25, 2019 8:38 AM

All replies

  • Hi Sualive,

    Your app is converted to Desktop bridge app for publishing to the store, right? Did you use the following code to get the roaming app data?

    string roamingPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData); 
    You could get more details in Handling data in a converted desktop app with the Desktop Bridge.

    Best regards

    Daisy  Tian

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    Friday, April 26, 2019 6:43 AM
  • Hi Daisy,

    Yes, I did use your exact same code getting roamingPath.

    I just have a look to your link and do not find anything wrong related to my code. So I try to explain a bit more. Perhaps this gives you any direction!

    As said above myApp is an extension – plugin – working when motherApp is running. For this to work myApp is meant to install small script.ruby inside roamingPath\motherApp\Plugins\ folder.

    So, myApp first check for motherApp to be installed checking the File.exists(progFile\...\motherApp.exe) and also DirectoryExists(roamingPath\motherApp\Plugins\). All working right here and myApp allows the user for plugin install.

    When user clicks ‘install’, myApp checks exiting source-files using AppDomain.CurrentDomain.BaseDirectory to get the myApp directory then add sub directory where are located source-files. Everything right here and method returns True.

    Now myApp checks for target-files already exists and deletes if so. No problem here, of course.

    Finally, it’s time to create one sub directory and copy script-files. Here is the issue as it does not work when myApp downloaded and installed from Store.

    Directory.CreateDirectory(roamingPath\motherApp\Plugins\myApp) does not raise any exception but does not create the sub directory.

    I use a method to read source-files then write target-files that does not raise any exception but does not write the files inside roamingPath\motherApp\Plugins\ folder and sub directory, of course.

    Here is where I get puzzled. myApp says everything correctly installed but nothing exists in the roamingPath\motherApp\Plugins\ folder and running motherApp does not show the extension as you may guess.

    I get completely lost as myApp allows for uninstall a plugin which is actually not installed. If I click uninstall, everything goes right and myApp says I can install another time.

    Hope this helps.


    Friday, April 26, 2019 8:26 AM