Search code examples
silverlightxap

New Silverlight app doesn't generate XAP


I have created a new Silverlight app and it created a XAp file under the CLientBin on the Server side.

However after copying an existing project into the same folder and adding it to the solution, the XAP file is not being generated for the this assembly.

What am I missing?

Many Thanks,


Solution

  • Do not attempt to modify your project/solution files manually unless you know exactly what you are doing :)

    Adding it to the solution is not enough. You need to make a Silverlight relationship between the website and your Silverlight application.

    • Right-click on your website project and select Properties.
    • Choose the Silverlight Applications tab on the left side
    • Press Add...
    • Leave Use an existing Silverlight project in the solution checked and select the project you want to add from the Project dropdown.
    • Leave Add a test page that references the control checked if you want a separate test page for your application.
    • Press Add and you are done.

    The website will now build your Silverlight application and include the output Xap file in its ClientBin folder.

    Add Silverlight Application dialog