Need solution for XamlParseException issue RRS feed

  • Question

  • Hi everyone,

    I have problem with really strange issue. My newest updated app sometimes, not always for some users is throwing exception. Probably in the first run after update. I pasted the exception below. There is information about problem with my custom control OLXAddAdvertInlinePriceInputControl. The point is that I renamed the control to "InlinePriceInputControl". So there not exists any control, any even text in XAML with OLXAddAdvertInlinePriceInputControl in the newest update. What happening here ?

    System.Reflection.TargetInvocationException, Exception has been thrown by the target of an invocation.
    at System.Windows.Navigation.PageResourceContentLoader.EndLoad(IAsyncResult asyncResult)
    at System.Windows.Navigation.NavigationService.ContentLoader_BeginLoad_Callback(IAsyncResult result)
    at System.Windows.Navigation.PageResourceContentLoader.BeginLoad_OnUIThread(AsyncCallback userCallback, PageResourceContentLoaderAsyncResult result)
    at System.Windows.Navigation.PageResourceContentLoader.<>c__DisplayClass4.<BeginLoad>b__0(Object args)
    at OLX.Models.Exceptions.AsyncSynchronizationContext.<>c__DisplayClass0.<WrapCallback>b__2(Object state)
    System.Windows.Markup.XamlParseException, [Line: 0 Position: 0]
    at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
    at OLX.Views.MainPageView.InitializeComponent()
    at OLX.Views.MainPageView..ctor()
    System.Windows.Markup.XamlParseException, Failed to create a 'System.Type' from the text 'OLXControlsAddingAdvertFilters:OLXAddAdvertInlinePriceInputControl'. [Line: 2801 Position: 23]
    at MS.Internal.XcpImports.CreateFromXaml(UnmanagedMemoryStream stream, String sourceAssemblyName, Boolean createNamescope, Boolean requireDefaultNamespace, Boolean allowEventHandlers, String xamlResourceUriString)
    at System.Windows.Controls.Control.LoadXamlResource(Assembly source, String streamName, CultureInfo cultureInfo)

    • Edited by matipxd Monday, November 10, 2014 3:53 PM
    Monday, November 10, 2014 3:47 PM


All replies

  • Well, there's clearly somewhere in the app that the name exists. Have you opened every single page to check for that string?

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Tuesday, November 11, 2014 1:41 PM
  • Yes I checked,

    I think the issue exists because a special file "Generic.xaml" which contains default templates of the controls, is not updated after app has been updated. I trying find out some solution to the unknown issue. Maybe should I increase project version where the custom controls are placed before build next app version. I thinking also that maybe the project name causes the issue because the project has dot inside (like MyProject.CustomControls).

    Friday, December 5, 2014 8:48 AM
  • I probably got it:

    File "Generic.xaml" has BuildAction set to "Page", but should be set "Resource"

    Friday, December 5, 2014 9:17 AM