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.
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.
I'm developing Silverlight application in expression blend2 and VS2008.
For that, I need to know which type of executable file it will be generated whether .exe or some other.
Silverlight was meant to be run through a web browser.
When building SL applications, the result will be a .xap file.
The .xap file is really a zip file, and includes AppManifest.xaml, compiled output assembly of the Silverlight project (.dll) and any other resource files referred by the Silverlight application.
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/
I'm using MEF with my Silverlight 4 app to dynamically load xap files. To optimize this process, I've removed various assemblies from my xaps since I know they've already been loaded by the base xap. This reduces the size of my dynamically loaded xaps. I accomplished this by setting the "Copy Local" flag for each assembly reference to "false".
This all seems to work fine when I build in Visual Studio 2010 - my xaps are much smaller. However, when the same projects are built by the build server, all the excluded references are once again in the xap file hence tripling the size of the xap.
I've read several blogs/articles regarding similar experiences but no resolution. Very frustrating - any help is appreciated.
Xap files are just Zip files with a different extension. So if you can't figure out why the build server is including the assemblies you don't need, you could create a post-build step that treats the Xap as a Zip and removes those assemblies from it.