Is it possible to access or get file list in xap file through desktop application.If possible please let me know how to do this.
Thanks
Dinesh
XAPs are just ZIP files.
You can use any ZIP library, such as the ZipArchive class in .Net 4.5.
Related
I need to deploy a WinForm application and I need to generate just 1 .exe file.
I tried with ClickOnce but it generates also a manifest file, so I can't use it,
and I can not use the Release folder content because there aerseveral files (eg. strings resources)
Thanks a lot!
There's a little tool called ILMerge.
With this it is possible to merge several dlls and exe into one exe.
I don't know if it is possible to integrate resource files as well, but i don't think so.
Have a look at:
ILMerge Best Practices
I develop a Silverlight application and I renamed the extension from XAP to ZIP. With WinZip I can view all my files and folders of the Silverlight application.
I have no experience with Windows Phone development so, recently I try to do the same with a Windows Phone XAP file and renamed it to ZIP.
When I try do open with WinZip I get the message:
"Cannot open file 'xxxx.zip'. It does not appear to be a valid archive"
I try the same with WinRAR, 7Zip, PeaZIP and I can't still open the file.
My question is:
Are Silverlight XAPs and Windows Phone XAPs different things?
Thank you
I don't know the if and what the differences might be but I do know that you can open Windows Phone XAP files using those programs (at least WinRAR). You can verify this by creating a WP project in Visual Studio, build the project and then go to the /bin/release or /bin/debug directory and open the XAP file with WinRAR for example. I just did this with a Windows Phone 8 app built using Visual Studio 2012.
BUT you can only do that to XAP files which are NOT signed. This is because when the XAP file is uploaded to the store they are signed to protect them and guarantee that no-one has tampered with the code. The XAP files are automatically signed when uploaded to the store (see submission step 4 here: http://msdn.microsoft.com/en-us/library/windowsphone/help/jj206729(v=vs.105).aspx).
More about signing of XAP files for LightSwitch can be found here, but I would guess it works in a similair way for Windows Phone XAP files.
The spec, how they work, and layout is the same. However the binary executables in them are different and compiled for the specific platform.
Can anybody suggest a tool to convert Silverlight xap files to Windows executables? I googled and got this this link but it does not work.
Edit: The Silverlight application has been compiled without the out-of-browser switch and I want to know if there is a solution which does not require me to open the project and recompile with out-of browser mode on.
A XAP file is just a Zip file that has a different extension. You can easily use libraries like SharpLib or DotNetZip to extract the contents of it. You can also manualy change the extension of a .xap file to .zip and then extract it in a folder. When extracted, you would get all the assemblies that were bundled as part of the .xap file.
Everything is clearly explained in the following link,
Extracting Assemblies from a XAP File
This link might be of interest:
http://www.amazedsaint.com/2010/05/how-to-create-offline-installer-no.html
It describes creating an installer that installs silverlight on machines where it is not present, as well as an Out-of-browser silverlight application and start menu links. You can use this installer on machines with no internet connection and no .net runtime installed. So it offers most of the practical benefits of converting it to an exe. I followed that procedure before and found it good.
What does XAP stand for? is it an acronym? I know what silverlight XAP file contains but dont know what it stands for.
Silverlight Application Package
http://www.sharpened.net/extensions/file/xap
http://forums.asp.net/t/1277554.aspx
The X doesn't mean anything. I've asked, too.
From what I can tell, they didn't want it to look too much like *.ZIP or *.SAP.
I would guess XML Application Package.
When a Silverlight Application is compiled a .xap file is created that contains the application.
A .xap file is basically a compiled Silverlight application. The file is actually a .zip file that contains all the files necessary for the application. Just rename the .xap file to have a .zip extension and then you can open it up to see its contents.
Anatomy of XAP file
Perhaps *XA*ML *P*ackage --
It means "Silverlight Application Package" and "Xact Project"
Other meanings without silverlight is http://www.acronym24.com/xap-meaning/
Basically i want to utilize the Silverlight Video player on Codeplex in another Silverlight application. Is this possible. Can anyone point me in the right direction on how to achieve this?
Thanks
J
If you just have a few assemblies of interest, such as those video player .dll files, then you could of course:
Rename the .xap to .zip
Extract the contents
Copy the .dll assemblies into your project
Reference the .dll's
Unfortunately, I'm guessing that you might be wanting to take advantage of the actual video player application - which includes custom handling for init parameters of the control, and just include that .Xap file into your solution. I don't know of an easy way to do that.
adding another xap file to your project, yes. you'll need to manually load the assemblies inside the xap package to utilize it.
Check the downloadable project solution here: http://www.wintellect.com/CS/blogs/jprosise/archive/2010/06/21/dynamic-localization-in-silverlight.aspx
the solution basically has two silverlight projects, the ExternalResources project's generated xap gets created and it's assemblies are manually loaded when needed.