• Login
  • Register

DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

DependencyProvider not found in Globals

You are not authorized to post a reply.
Sort:


New Member


Posts:3
New Member

    Hi,

    We have a DNN Portal with some .cs files from your development project (like "login.ascx.cs"), and after the upgrade from 9.3.2 to 9.9.1, we fetched the .cs files from your 9.9.1 project, and Compiling the solution we get " 'Globals' does not contain a definition for 'DependencyProvider' ".
    We already checked, multiple times, and the "DotNetNuke.dll" has the 9.9.1 version. We already tried to apply the .dll from you deploy .zip file and still get the same error. we compiled your entire solution in release and used the dlls but still the same.
    Can you give us a hand please?
    TY



    Veteran Member


    Posts:1133
    Veteran Member

      You definitely need to provide more details ...

      You upgraded a DNN installation from 9.3.2 to 9.9.1? Did you do necesary modules upgrades? (Check the release notes for versions from 9.3.2 up to 9.9.1.)

      Why did you "fetch the .cs files"? What are you trying to do?

      What are you trying to compile? If you want to compile the entire DNN solution, you'll want to find Peter Donker's videos on doing this. Start with https://www.youtube.com/watch?v=TkJqO8DYj8o and look for the link to Peter's video list in the Notes.
      Joe Craig
      DNN MVP
      Patapsco Research Group


      New Member


      Posts:3
      New Member

        our DNN portals are always based on your "DotNetNuke.Website.csproj" so we stick with the .cs files. and it´s great since we always do some twicks/changes in your code.
        but sticking to the point, after trying to build our website with the dlls with version 9.9.1 we get the error and can´t get passed it.

         



        Basic Member


        Posts:114
        Basic Member

          I'm guessing by login.ascx.cs you're referring to the skin object, DNN Platform/Website/admin/Skins/Login.ascx.cs, right? Unfortunately, Globals.DependencyProvider is marked as internal and so isn't available outside of the DNN Platform itself. At this point, SkinObjectBase doesn't support dependency injection so there's not a mechanism available to you to get an INavigationManager instance. For now you'll need to use the Globals.NavigateURL method instead.

          DNN partner specializing in custom, enterprise DNN development https://engagesoftware.com/showcase


          New Member


          Posts:3
          New Member

            It solved it! Ty!
            Regarding the removal of Globals.NavigateURL in v11, before that will Globals.DependencyProvider work outside of the DNN Platform itself?



            Basic Member


            Posts:114
            Basic Member

              The plan 🤞🏻 is for dependency injection to work in all areas of the platform in DNN 10 so that Globals.DependencyProvider is no longer needed.

              DNN partner specializing in custom, enterprise DNN development https://engagesoftware.com/showcase
              You are not authorized to post a reply.

              These Forums are dedicated to discussion of DNN Platform.

              For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

              1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
              2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
              3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
              4. No Flaming or Trolling.
              5. No Profanity, Racism, or Prejudice.
              6. Site Moderators have the final word on approving / removing a thread or post or comment.
              7. English language posting only, please.

              Would you like to help us?

              Awesome! Simply post in the forums using the link below and we'll get you started.

              Get Involved