AppManifest and Deployment targeting a class library in Silverlight RRS feed

  • Question

  • Hello.

    From a wizzard generated Silverlight application, I try to move all interface code to a class library.

    I have found an elegant way, which worked, but only once.


    Create a class library in the wizzard generated solution and make the app project reference it.

    MOVE all .xaml files from the application project to the library project.

    Edit AppManifest.xml as follows:

    <Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment"
                EntryPointType="SilverlightApplication1.App"   // the app class name has not changed.
                EntryPointAssembly="SilverlightClassLibrary1">   // the name of the wizzard generated class library.


    Unfortunately, as stated before, this worked for me ONCE, but debugging the application as described here leads to a warning:

    Error: Unhandled Error in Silverlight Application
    Code: 2103   
    Category: InitializeError      
    Message: Invalid or malformed application: Check manifest  

    and the page does not get displayed.


    Any idea of what I am missing in that trick that seemed "simple"?


    Thanks for any help!

    • Edited by Sylvain De Tuesday, February 15, 2011 1:23 PM
    Tuesday, February 15, 2011 11:34 AM


  • Found! Maybe it can be uselfull to others:


    After altering the AppManifest.xml file, you have 2 definitions for the application entry point:

    One in AppManifest.xml.

    One in the SilverlightApplication1.csproj: right click on the app project, properties, and remove the "startup object" that was originally set by the wizzard.


    It took me half a day to find that again... ;)

    • Marked as answer by Sylvain De Tuesday, February 15, 2011 1:23 PM
    Tuesday, February 15, 2011 1:23 PM