none
Can i get my app back from Marketplace? I accidentally deleted it from my PC

    Question

  • I accidentally erased my app on my PC.  I went to go do some work on the next upgrade and all my files are gone.  Somehow i deleted the content inside the folder.

    My question is how can i get Microsoft to give me a copy of the app so i can start working on the upgrade?  And if I do get the .xap file will I be able to edit it again within VS or Blend? I did not harden the code with Dotfuscator.  Please help!
    Friday, April 01, 2011 2:19 PM

Answers

  • Take a deep breath and repeat after me....  Source Control, Source Control Source Control.  There are too many free source control systems out there to not be using one.  Heck, just keep your source code in skydrive or dropbox, that is still better than nothing.

    Now with regards to your question.  I would first check if there is a way to just get the xap file directly of your device itself (not sure if it is possible, maybe someone else can shed some light here).  When/if you can get the xap file.  Change the .xap extension to .zip and you can now see all of your compiled assemblies.  Since it is compiled you will not be able to get back the original code files, but you can use the best tool in the world Reflector to reflect into the assemblies and at least start rebuilding some of your original code base.  Is it an easy or pretty process, absolutely not, but hey at least you don't have to start from scratch. :)

    There may be other items that are not recoverable from the compile process but at least you have a place to start.

    Good luck!
    Friday, April 01, 2011 2:40 PM
  • I would start to try to undelete it with one of these rescue apps available on the internet. If the files are not yet overwritten there is a good chance to get them back. I assume they are also not in the paper bin? If you get the XAP back (probably not official from Microsoft, but maybe directly from your phone using the homebrew stuff arround there) you can unzip the file and try to use reflector to get the source back. But it will be a lot of work and it's probably easier for a small app to just re-do the coding.
    Friday, April 01, 2011 2:41 PM
  • deep breath exhaled, aaaahhh.Yes, i do have the .xap file. Thank you for the advice, and yes it is a simple app but I put a lot of time into the UI.  I guess it might be better to start over and release version 2.0.  I will try reflector, is there a way i could use VS 2010 express for WP7 to open the .zip as a project source?
    Friday, April 01, 2011 3:05 PM
  • There's no automated way... you have to do it by hand... all of your private variables names and comments are gone and your code will look a little bit different than what you remember. You'll need to save out all the source and reconstruct the project and solution.

    Also Reflector is no longer free (but worth the buy IMO) ILSpy is free and does most of the same stuff http://wiki.sharpdevelop.net/ILSpy.ashx

    and on the off chance that you are actually just asking us how to reverse engineer someone elses app I will leave the finer details for you to work out yourself... 

    Friday, April 01, 2011 3:39 PM

All replies

  • Take a deep breath and repeat after me....  Source Control, Source Control Source Control.  There are too many free source control systems out there to not be using one.  Heck, just keep your source code in skydrive or dropbox, that is still better than nothing.

    Now with regards to your question.  I would first check if there is a way to just get the xap file directly of your device itself (not sure if it is possible, maybe someone else can shed some light here).  When/if you can get the xap file.  Change the .xap extension to .zip and you can now see all of your compiled assemblies.  Since it is compiled you will not be able to get back the original code files, but you can use the best tool in the world Reflector to reflect into the assemblies and at least start rebuilding some of your original code base.  Is it an easy or pretty process, absolutely not, but hey at least you don't have to start from scratch. :)

    There may be other items that are not recoverable from the compile process but at least you have a place to start.

    Good luck!
    Friday, April 01, 2011 2:40 PM
  • I would start to try to undelete it with one of these rescue apps available on the internet. If the files are not yet overwritten there is a good chance to get them back. I assume they are also not in the paper bin? If you get the XAP back (probably not official from Microsoft, but maybe directly from your phone using the homebrew stuff arround there) you can unzip the file and try to use reflector to get the source back. But it will be a lot of work and it's probably easier for a small app to just re-do the coding.
    Friday, April 01, 2011 2:41 PM
  • deep breath exhaled, aaaahhh.Yes, i do have the .xap file. Thank you for the advice, and yes it is a simple app but I put a lot of time into the UI.  I guess it might be better to start over and release version 2.0.  I will try reflector, is there a way i could use VS 2010 express for WP7 to open the .zip as a project source?
    Friday, April 01, 2011 3:05 PM
  • There's no automated way... you have to do it by hand... all of your private variables names and comments are gone and your code will look a little bit different than what you remember. You'll need to save out all the source and reconstruct the project and solution.

    Also Reflector is no longer free (but worth the buy IMO) ILSpy is free and does most of the same stuff http://wiki.sharpdevelop.net/ILSpy.ashx

    and on the off chance that you are actually just asking us how to reverse engineer someone elses app I will leave the finer details for you to work out yourself... 

    Friday, April 01, 2011 3:39 PM
  • lol, no i am not stealing someone's work. Thats how nieve I am, that thought never crossed my mind when i asked this question in the forum. I can defintiely see the concern.

    I've decided just to rewrite it, I've gotten over 11,000 downloads to date and  I think a fresher UI would be a nice reward to my users for the support. The ads alone are supporting the time I put into it. Thank you guys for the help, I always tell everyone we have the best developer community in existance.  Even with the risk that someone is reverse engineering an app there is still support.

    Peace out,
    Lance
    Friday, April 01, 2011 3:50 PM
  • I just found the folder that I saved my app in and everything is still there! So, the only place I dont see anything is when I open the solution, there are no items under the solution name.  How do I get the solution explorer to show everything again?  SO to summarize, I accidentally deleted the app while I was in Expression Blend but it did not delete from my drive, only in the solution explorer.

      Is there a way I can just get VS or Blend to recognize it?  It still shows the app name when I open the solution file, but the appmanifest file is missing.  How can I rebuild it? All of the pages and content is there too.

    Thanks!
    Friday, April 08, 2011 12:50 PM
  • So you have the solution, just no pages or content? Just do a Show All Files in the Solution Explorer are re-add everything.
    Friday, April 08, 2011 1:25 PM
  • When I open the solution VS tells me that there is no appmanifest file. Then in the tree in the solution explorer the appminifest file is there.  When i try to load it in the designer, I get a load error and this for my xaml

    <

     

     

    Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" EntryPointAssembly="SecurityStrobe" EntryPointType="WindowsPhoneApplication1.App" RuntimeVersion="3.0.40624.0">

     

     

     

     

    <Deployment.Parts>

     

     

     

     

    <AssemblyPart x:Name="SecurityStrobe" Source="SecurityStrobe.dll" />

     

     

     

     

    <AssemblyPart x:Name="Microsoft.Advertising.Mobile.UI" Source="Microsoft.Advertising.Mobile.UI.dll" />

     

     

     

     

    <AssemblyPart x:Name="Microsoft.Expression.Interactions" Source="Microsoft.Expression.Interactions.dll" />

     

     

     

     

    <AssemblyPart x:Name="Microsoft.Phone.Controls" Source="Microsoft.Phone.Controls.dll" />

     

     

     

     

    <AssemblyPart x:Name="System.Windows.Interactivity" Source="System.Windows.Interactivity.dll" />

     

     

     

     

    </Deployment.Parts>

     

    </

     

     

    Deployment>

     



    the <AssemblyPart gets the underlining and I cannot deploy to the phone.  I screwed up because I should have left it alone because all i need is my xap file (am adding instrumentation with dotfuscator and all i need is my xap) and I rebuilt the app thinking it would fix the error. I think I am getting down to what is missing because here is the error messages I get when trying to deploy..

    Error 1 The type 'Deployment' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. C:\Users\Lance_School\Desktop\SecurityStrobe\SecurityStrobe\WindowsPhoneApplication1\AppManifest.xaml 1 2 SecurityStrobe

    Error 2 The attachable property 'Parts' was not found in type 'Deployment'. C:\Users\Lance_School\Desktop\SecurityStrobe\SecurityStrobe\WindowsPhoneApplication1\AppManifest.xaml 2 4 SecurityStrobe

    Error 3 The type 'AssemblyPart' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. C:\Users\Lance_School\Desktop\SecurityStrobe\SecurityStrobe\WindowsPhoneApplication1\AppManifest.xaml 3 6 SecurityStrobe

    Error 4 The type 'AssemblyPart' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. C:\Users\Lance_School\Desktop\SecurityStrobe\SecurityStrobe\WindowsPhoneApplication1\AppManifest.xaml 4 6 SecurityStrobe

    Error 5 The type 'AssemblyPart' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. C:\Users\Lance_School\Desktop\SecurityStrobe\SecurityStrobe\WindowsPhoneApplication1\AppManifest.xaml 5 6 SecurityStrobe


    Where did my assembly references go?  I think that is the only thing I need to get back in there, how can I rebuild that?

    Thank you for your help!


    Friday, April 08, 2011 1:33 PM
  • Where did my assembly references go?
    They're not in the folder structure somewhere? If not, where did you reference them from originally?
    Friday, April 08, 2011 1:40 PM
  • The way this happened was I started to design another app and I somehow got both apps under the same solution.  In the solution explorer I just went and right clicked the extra app and deleted it from the project of the new app.  Never did I expect it to delete my original work from the first app.

    So Expression blend deleted the references in the original app.  So I still have everything else.  The references came with the default new Windows Phone Application page when you begin a new project.  There is nothing special other than what a WP7 starts with.

    Could I just start a blank new WP7 app and then copy the references into the damaged one? What doesnt make sense is that under the tree in the solution explorer, the correct references are there.  Even the Microsoft.Advertising.Mobile.UI reference is there, which tells me it is current.  I think I am missing these dll's.  I am not familiar with the mechanics of dll's and where they belong in order for an app to be built and deployed

    <AssemblyPart x:Name="SecurityStrobe" Source="SecurityStrobe.dll" /
    <AssemblyPart x:Name="Microsoft.Advertising.Mobile.UI" Source="Microsoft.Advertising.Mobile.UI.dll" />
    <AssemblyPart x:Name="Microsoft.Expression.Interactions" Source="Microsoft.Expression.Interactions.dll" />
    <AssemblyPart x:Name="Microsoft.Phone.Controls" Source="Microsoft.Phone.Controls.dll" />
    <AssemblyPart x:Name="System.Windows.Interactivity" Source="System.Windows.Interactivity.dll" />
    Friday, April 08, 2011 2:04 PM