none
VS 2019 and previous RRS feed

  • Question

  • There are still issues with VS 2019 and Inheriting a MasterPage and VS thinking its an error when i reference a property from it in code. Below is an example

    I inherit a base master class, which inherits MasterPage. Intellisense does not work and i have to code all of it by hand and then i get the wonderful red lines saying "Reference required...". The BOLD is the props in the class. It works fine when i compile it and run it, but it still shows errors. I have literally hundred of these. Please fix this issue, its been around for a while with previous versions of VS and is still there today. Clearing out cache (...\AppData\Local\Microsoft\VisualStudio\) and delete the .vs file, does NOT work, or should even work as a band-aid. Please get this cleared up or give me a PERMANENT solution. Its a real hassle.

    Error BC30652 Reference required to assembly 'App_Code.kmkazlrj, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' containing the type 'MyBaseMasterPageIP'. Add one to your project.


        Partial Class Ipxmhdatig_members_registration_childregistration
            Inherits MyBasePageIP
    ...
    ...
    ...
    
    Private Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
    
    ' check to show/hide the medical tab
                If Not Me.Master.MySession.ApplicationShowMedicalConditions() And Not Me.Master.MySession.ApplicationShowMedications() And Not Me.Master.MySession.ApplicationShowAllergies() Then
                    For Each RadWizardStep As RadWizardStep In Me.RadWizardMember.WizardSteps
    
    ...
    ...
    ...

    Tuesday, October 15, 2019 10:08 PM

All replies

  • Darn, just realized this is the wrong section and i can not move it. Sorry Mods!
    Tuesday, October 15, 2019 10:10 PM
  • Hi,

    If you are using some 3rd party product with VS 2019, you need to consult the 3rd party. 

    Regards,

    Ashidacchi -- http://hokusosha.com

    Tuesday, October 15, 2019 10:39 PM
  • Nope no 3rd party. Why do you say a 3rd party product? You can clearly see that its an issue with VS not picking up the inheritance of a materpage class in the app_code folder. 
    Tuesday, October 15, 2019 11:05 PM
  • Hi sharpDataInc,

    Welcome to MSDN forum.

    According to your description, I couldn’t understand why your master page’s class is in the app code folder.

    Do you create a master page inside the app code folder?

    Could you please tell me how you create a child page which inherits the master page?

    Besides, since this forum is mainly talking about visual studio debugger, I suggest you could post this issue on the asp.net forum, link: https://forums.asp.net/

    Best Regards,

    Dylan


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Wednesday, October 16, 2019 3:28 AM
  • Sorry about posting in the wrong forum. Could you move this over there? Maybe a Mod who can move it?

    Back to the issue - yes I created a master page in the app_code...

    Public Class MyBasePageIP
            Inherits System.Web.UI.Page

    ...and inherit it inside the content pages for code reuse. This works/compiles fine, its VS intellisense that does not pick it up and throws errors. Which are ignored and it runs, however, I can not use the intellisense. In 2017 I was able to clear the cache and the .vs file and it worked for a while, but would eventually break the intellisense again. 

    Wednesday, October 16, 2019 7:19 PM
  • Hi SharpDataInc,

    Sorry for delay in reply.

    For this issue, we recommend you could open file properties, then modify the Build Action to "Compile", then wait a moment to check if it could work. And it works on my side.

    BTW, the thread could not be moved to asp.net forum because the forms are different, you need to re-post it there, sorry for this inconvenience.

    Hope it could help you.

    Best Regards,

    Dylan


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com


    Friday, October 18, 2019 10:03 AM
  • Hi SharpDataInc,

    Did your issue still persist?

    The error is explained by Microsoft as this. As far as l know, the reason for this error is that you did not add a project reference for the dependency type in your project. If the class you are currently inheriting is not in the current project, please add a reference to the template page for the current project.

    > > Please right click on the References of your current project-->Add Reference-->Projects-->select the project of the MasterPage.

    Any feedback will be expected.

    Best Regards,

    Perry


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Tuesday, October 22, 2019 8:36 AM