Unknown Type of Member error

9 posts, 0 answers
  1. Timothy Corey
    Timothy Corey avatar
    3 posts
    Member since:
    May 2010

    Posted 22 Feb 2011 Link to this post

    I just started using JustCode, so please forgive my ignorance if I am missing something simple.  I opened up an existing project and immediately got hit with 73 errors in the file.  When I started investigating, they all have the same message "C#: Unknown Type of Member '<variable name>' ".  This only happens for the controls that are Telerik controls.  As you can see, this is happening in my code-behind when I try to set values or read values pertaining to these controls.  I get a similar error in the XAML ("XAML: Unknown Type '<control type>' ") as well.

    I've tried adjusting the options for JustCode to ignore these issues, since they aren't issues, but I cannot find any way to do so.  For the record, the code compiles and runs fine.  Below I've included an example of the XAML code that has the error as well as the C# code that has the error:

    XAML:
    <!-- Items in the header -->
    xmlns:telerikControls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
     
    <!-- Offending line - the issue is on the word RadComboBox -->
    <telerik:RadComboBox telerikControls:StyleManager.Theme="Vista" FontSize="18" Height="30" Name="semesterCombo" SelectionChanged="semesterCombo_SelectionChanged" />

    C#:
    //The error is on the word semesterCombo
    semesterCombo.SelectedIndex = 0;

    As an added note, the Telerik controls were simply dragged onto the page in XAML.  Please let me know what I am missing.  Thanks.
  2. Deyan Varchev
    Admin
    Deyan Varchev avatar
    150 posts

    Posted 09 Mar 2011 Link to this post

    Hello Timothy,

    We've been quite busy with the upcoming release so please excuse us for the late response. We had similar reports and we've been able to reproduce the problem. We won't be able to fix it for the Q1 release, but we'll try to address it in the Service Pack that should come in a month. As a temporary workaround you can check whether all your assembly references in your projects point to the same dll files. After that refresh the code analysis. That should fix the issue.

    Greetings,
    Deyan
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  3. DevCraft banner
  4. Timothy Corey
    Timothy Corey avatar
    3 posts
    Member since:
    May 2010

    Posted 14 Mar 2011 Link to this post

    OK, thank you for the update.  I'll try the workaround until the patch comes out.
  5. Sam
    Sam avatar
    23 posts
    Member since:
    Oct 2011

    Posted 30 Oct 2012 Link to this post

    Hey Deyan,

    Has this been solved yet? I am using the latest version of the ASP.NET Ajax controls and I am getting this error. Specifically I am trying to use them on a SharePoint 2010 application page.

    Thanks!
  6. Zdravko
    Admin
    Zdravko avatar
    657 posts

    Posted 02 Nov 2012 Link to this post

    Hi,

     @Sam
    Would you report some of the errors so we could investigate them?
    Thanks.

    Kind regards,
    Zdravko
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  7. Sam
    Sam avatar
    23 posts
    Member since:
    Oct 2011

    Posted 02 Nov 2012 Link to this post

    I posted this error in another Telerik forum as it's more SharePoint related.  Perhaps you can see it there.
  8. Robert Fuess
    Robert Fuess avatar
    6 posts
    Member since:
    Jul 2009

    Posted 09 Jan 2013 Link to this post

    I am having the same issue.  I have a dynamically loaded web user control.  It compiles fine... it works fine.. JustCode however, gives the error Unknown Type of Member...

    code:
    ===============
    private ControlsProductsOfPageGrid _grd;
        private ControlsProductsOfPageRow _row;

        /// <summary>
        /// dynamically load control
        /// </summary>
        private void BindProductList(CMPage pg)
        {
            if (pg.RssStyle.Trim() == string.Empty ||
                pg.RssStyle.Trim().ToLower() == "grid")
            {
                _grd = (ControlsProductsOfPageGrid)Page.LoadControl("~/controls/ProductsOfPageGrid.ascx");
                plProducts.Controls.Add(_grd);
            }
            else
            {
                _row = (ControlsProductsOfPageRow)Page.LoadControl("~/controls/ProductsOfPageRow.ascx");
                plProducts.Controls.Add(_row);
            }
        }

    ===================
    [update]

    This error went away when i corrected another error that did need correcting.... it was a false positive.
  9. Zdravko
    Admin
    Zdravko avatar
    657 posts

    Posted 13 Jan 2013 Link to this post

    Hi,

     Thanks for contacting us.
    Sometimes our analysis get confused by some other error somewhere in the code and unexpected false positives appear.
    I am glad that you have fixed your issue. 
    If you have any other false positives please report them or provide us a sample project so we could try reproduce and fix them.
    Thank you.

    All the best,
    Zdravko
    the Telerik team
    Share what you think about JustCode with us, so we can help you even better! You can use the built-in feedback tool inside JustCode, our forum, or our JustCode feedback portal.
  10. YYZRichard
    YYZRichard avatar
    20 posts
    Member since:
    Dec 2009

    Posted 28 May 2013 Link to this post


Back to Top
DevCraft banner