If you need to create a XAP file you can do it very easily by using Chiron. Chiron is a tool that produces Silverlight application packages (XAPs) for applications using Dynamic Language Runtime (DLR) based languages. The main usage of Chiron is to run as a localhost web-server, and it will automate the XAP file creation with every web-request. Moreover you can manually generate and save XAP file to the disc by running command like:
> Chiron.exe /directory:MyApp\app /zipdlr:app.xap
If Chiron is installed it can be found in the following folder 'C:\Program Files\Microsoft SDKs\Silverlight\v2.0\Tools'.
Read more about Chiron here.
That's it!