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,
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.
Properties
.Silverlight Applications
tab on the left sideAdd...
Use an existing Silverlight project in the solution
checked and select the project you want to add from the Project
dropdown.Add a test page that references the control
checked if you want a separate test page for your application.Add
and you are done.The website will now build your Silverlight application and include the output Xap file in its ClientBin folder.
You need to update your project files:
The Silverlight project file contains a parameter indicating a server project:
<LinkedServerProject>..\SLClient.Web\SLClient.Web.csproj</LinkedServerProject>
The Web application project file contains a list of the Silverlight application projects:
<SilverlightApplicationList>{97E56891-B97D-4588-8262-BFB7DC5FD6D2}|..\SLClient\SLClient.csproj|ClientBin|False</SilverlightApplicationList>
This value tells MSBuild to copy the XAP in the clientBin directory.
Take note of the supplied GUID. It can be obtained from the Silverlight app csproj file:
<ProjectGuid>{97E56891-B97D-4588-8262-BFB7DC5FD6D2}</ProjectGuid>
You can open the project files in Visual Studio by first unloading the project in the context menu.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With