The Big Picture –
What happens behind when you build your application ? ? ?
- There are bunch of C# files (some created automatically by Visual Studio and some written by you), and some XAML files.
- They all are compiled by the compiler into – “ DLL file” & “AppManifest.xaml” file is generated. (you can find them in “Bin/Debug“ subdirectory of your project folder.)
- These files are then gathered together and compressed to one ZIP file… that has the “XAP extension“. So, what does this XAP file conatins ???
- Now when the Silverlight appliaction has been published, either locally (localhost) or on a real server, you can request the “TestPage.html” from the browser.
So, What does this html do ???
- It references the “yourprojectName.xap” file, so the browser will run the “Silverlight Plug-in” which will download the XAP file. When the file is downloaded, Silverlight will extract it and read the AppManifest.xaml file.
So,What does this file do ?
- It contains information which DLL, Silverlight needs to load and which class to instantiate first (by default it’s noramlly is App class). So, once the instance of App class is created, the silverlight apllication starts to execute.
The “.xap” file is basically a compressed .zip package file containing all the assembly + .dll references
needed to run your Silverlight application. You can do a simple test by renaming
the “.xap” extension of this file with “.zip”, and then unzip it to see its content.
Your “.xap” package will contain files (AppManifest.xaml + dll’s + TestPage.html + other media files, if included).
