locked
Does a dynamic xap loader using DeploymentCatalog work in SL 5? RRS feed

  • Question

  • My co-worker is using VS 2010 and has tried to upgrade her solution from SL 4 to SL 5. After figuring out a couple of compiler issues because she had some old assemblies, at runtime, when the "new DeploymentCatalog" is executed, an exception is raised that wasn't raised in SL 4.

    Here is the error message, but is there any reason it shouldn't be able to work in SL 5?


    • Edited by mltiede Tuesday, June 23, 2015 8:58 PM
    Tuesday, June 23, 2015 8:54 PM

Answers

  • Hi mltiede,

    Based on the message that in the image, this error caused by the type of DeploymentCatalog. Where is DeploymentCatalog? Please confirm whether the assemblies which contains DeploymentCatalog have been referenced and it should be in the bin directory of your application. Please use following code to confirm the specific information that caused the error.

    try
    {
        //The code that causes the error
    }
    catch (ReflectionTypeLoadException ex)
    {
        StringBuilder sb = new StringBuilder();
        foreach (Exception exSub in ex.LoaderExceptions)
        {
            sb.AppendLine(exSub.Message);
            FileNotFoundException exFileNotFound = exSub as FileNotFoundException;
            if (exFileNotFound != null)
            {                
                if(!string.IsNullOrEmpty(exFileNotFound.FusionLog))
                {
                    sb.AppendLine("Fusion Log:");
                    sb.AppendLine(exFileNotFound.FusionLog);
                }
            }
            sb.AppendLine();
        }
        string errorMessage = sb.ToString();
        //Display the error
    }
    

    Best Regards,
    Weiwei

    Wednesday, June 24, 2015 9:00 AM
    Moderator

All replies

  • Hi mltiede,

    Based on the message that in the image, this error caused by the type of DeploymentCatalog. Where is DeploymentCatalog? Please confirm whether the assemblies which contains DeploymentCatalog have been referenced and it should be in the bin directory of your application. Please use following code to confirm the specific information that caused the error.

    try
    {
        //The code that causes the error
    }
    catch (ReflectionTypeLoadException ex)
    {
        StringBuilder sb = new StringBuilder();
        foreach (Exception exSub in ex.LoaderExceptions)
        {
            sb.AppendLine(exSub.Message);
            FileNotFoundException exFileNotFound = exSub as FileNotFoundException;
            if (exFileNotFound != null)
            {                
                if(!string.IsNullOrEmpty(exFileNotFound.FusionLog))
                {
                    sb.AppendLine("Fusion Log:");
                    sb.AppendLine(exFileNotFound.FusionLog);
                }
            }
            sb.AppendLine();
        }
        string errorMessage = sb.ToString();
        //Display the error
    }
    

    Best Regards,
    Weiwei

    Wednesday, June 24, 2015 9:00 AM
    Moderator
  • She found the missing assembly. Thanks.
    Wednesday, June 24, 2015 12:30 PM
  • Hi Mark,

    I will mark my post as answer, if this doesn't give you any help, please feel free to let me know and follow up.


    Best Regards,
    Weiwei

    Tuesday, June 30, 2015 5:51 AM
    Moderator