Windows app certification failed RRS feed

  • Question

  • My app has failed the certification .The reason they have given is that my app crashed during the certification process.I have used sqlite database.To copy the database into the localfolder i am using the following code.It copies the database from assets of bin folder of the project.

    if (fileexists == false)
                     string MyDbFile = "Assets\\Programs.sqlite";
                    StorageFolder InstallationFolder = Windows.ApplicationModel.Package.Current.InstalledLocation;
                    file = await InstallationFolder.GetFileAsync(MyDbFile);
                    await file.CopyAsync(ApplicationData.Current.LocalFolder);

    whenever i run the project in release mode it fails to copy the database file giving the error that "the file not found", so i have to copy it myself to the assets.

    Is this the reason for app failing certification????

    Thursday, October 31, 2013 12:53 PM


  • yup.I got the same error but could not find the solution.So i uploaded it anyway...now after 5 days of submission i have got the result from testers.
    Thursday, October 31, 2013 5:02 PM

All replies

  • Hi,

    we are using a similar approch

    We added the db file to the asset Folder of our app. Set the "Build Action" of the file to "Content" and "Copy To Output" to "Do not Copy" and on Startup befor the DataBaseConnector connects to the db we do this.

    StorageFile file = await ApplicationData.Current.LocalFolder.CreateFileAsync("db.sql", CreationCollisionOption.ReplaceExisting).AsTask(token);
     StorageFile dbfile = await Package.Current.InstalledLocation.GetFileAsync(@"Assets\db.sql").AsTask(token);
    var dbcontent = await FileIO.ReadBufferAsync(dbfile).AsTask(token);
    await FileIO.WriteBufferAsync(file, dbcontent).AsTask(token);

    This is working for us. We only had problems that it took to Long to copy the file and the activation of the app took a Little bit longer. So the app was killed. We solved it by adding a extendet Splashscreen and doing all the work there.


    Thursday, October 31, 2013 1:36 PM
  • but i am doing the same thing.my query is if this sqlite file is included in the package or not??
    Thursday, October 31, 2013 2:33 PM
  • After building you can look in your app package to confirm that the file is there. You'll need to set the file's properties to Content and to copy to the output directory. Setting it as "Do Not Copy" will cause the problem.


    Thursday, October 31, 2013 2:46 PM
  • Well... I double checked my solution in my app it´s working with "Do Not Copy" like all the Images in the Asset Folder. What happens if you create the appx and open it by renaming it to zip. Is the db file in the asset folder inside the appx?


    Thursday, October 31, 2013 3:07 PM
  • my programs.sqlite file is not in solution explorer but in the assets of bin folder.How can i change its properties from there?
    Thursday, October 31, 2013 3:25 PM
  • Im a copying programs.sqlite from assets of bin to local folder .when i build the app package this file is not copied.how can i include it in my package
    Thursday, October 31, 2013 3:26 PM
  • you need to add the db-file to your Project Via File -> Add Existing.... If it is not part of the Project it will not be copied into the appx.


    Thursday, October 31, 2013 3:29 PM
  • i just need to keep the file in the assets folder in solution explorer or do i need to keep my file somewhere else too???
    Thursday, October 31, 2013 3:41 PM
  • only in the asset folder of your project i would say. at least if you want to keep a backup somewhere store it on your hardisc outside the project Directory. We put our db under source control... so in our case it gets backuped by the version control.


    Thursday, October 31, 2013 3:59 PM
  • okie..ya it works .Do u think this could be the reason for my app getting crashed during certification process?
    Thursday, October 31, 2013 4:46 PM
  • I think so... Did you test your app with wack bevor submitting it to the store?


    Thursday, October 31, 2013 4:52 PM
  • yup.I got the same error but could not find the solution.So i uploaded it anyway...now after 5 days of submission i have got the result from testers.
    Thursday, October 31, 2013 5:02 PM