Question

I am new to windows phone. i need to deploy two xap files as one application to device. In fact we can say that i need to merge them. These two application should also interact between them. Can it be doable?

EDIT:

Firstly my question was the question above. But i understand that there is no way to launch another application inside the other one. So i think it would be meaningless to merge them if ever we could have done so. So i edited the question:

I have one applications xap file and i need to develop another application which should call this applications first page when user clicks some button on develeping application. The questions are:

  • Can i import xap file into developing project or xap file of it?
  • Can i import xap file as a library project to developing project?
  • Can it be done without source code of the already developed application so that i can interact it from developing application?
Était-ce utile?

La solution

  • Can i import xap file into developing project or xap file of it?

No, WP7 app can't have nested xap files - such app will fail the certification in the Marketplace.

  • Can i import xap file as a library project to developing project?

If you can unpack the xap file (as it is a zip folder) - you can use dlls to add them as references. So, you can execute some code from that application.

  • Can it be done without source code of the already developed application so that I can interact it from developing application?

You can try to decompile that app (using dotPeeker for example) if it's legal in your country.

But in general the answer is no.

Autres conseils

  • you cannot just import pure xap into your project and use it
  • you can extract files from the xap and reference them as a library, call methods in it, etc.
  • you can also disassemble these libraries into source code and use it in your app directly. For simple projects it might be quite easy, for complex it might not possible at all - the dlls might be obfuscated and you might not be able to use them at all.

As others have said, the answer to these questions in general is "no", but regarding your question "Can i import xap file as a library project to developing project?" - the answer is "maybe, but not directly". If you are just trying to call functions from a DLL that's in the 2nd xap file, then you might be able to extract the DLL from the XAP (by first changing the xap's filename extension to .zip) and then reference that DLL in your project. Of course, if you have the source code for that 2nd xap file, then you're probably better off building the DLL into your VS solution as a separate source project and then referencing that VS project from the calling assembly.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top