DNN Forums

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

Compilation problem when upgrading to DNN 9.12

Sort:
You are not authorized to post a reply.





New Around Here





    Hi

    I'm trying to update a Class Library Project to make it compatible with DNN 9.12.0 but I'm facing to the following error:
    SGEN : error CS0012: The type 'System.Collections.Generic.ICollection`1' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'.

    First, I changed the project references to use the DNN 9.12.0 assemblies and I configured the project compilation to target Microsoft .Net Framework 4.7.2. I tried to add a reference to the netstandard assembly with no success.

    I've searched for a solution but I didn't manage to get a working one. I looked at https://stackoverflow.com...ion-2-0-0-0 but it doesn't seem to correspond to my case.

    If someone known this problem and how to solve it, I'll appreciate your help.






    Senior Member





      This kind of error is actually pretty common when updating an existing application that has dependencies on other DLLs.  You're already heading down the correct path with the troubleshooting you're doing.  

      Be sure you're using nuget to import the dependencies so that you're not making any manual mistakes.  

      The target framework was one of the first things I would have updated as well.  4.7.2 and 4.8 are fine for newer versions of DNN.  So, you're good there.  

      Now, if you're sure all of the existing dependencies are good, I'd also suggest removing any that you're not actually using.  Remove them one-by-one, compile, and then see what happens. 

      Since you're already done some of the other common troubleshooting steps, I'm guessing you'll find the issue after doing the additional troubleshooting above.  

      Good luck!  👍🏽 






      New Around Here





        Thank you for your support.
        I already tried to remove all DNN assembly references plus all Nuget packages to be sure to have a clean solution.
        Then I tried to add only few DNN nuget packages for the DNN 9.12 version. When I managed to remove all undefined references errors the previous error came back.
        I'll made others tests soonly.
        Thanks.






        Senior Member





          Posted By Stephane Tetard on 9/8/2023 5:32 AM

          Thank you for your support.

          Always my pleasure. 😊 

          Posted By Stephane Tetard on 9/8/2023 5:32 AM

          I'll made others tests soonly.

          Please update us when you're done.   🤔

          You are not authorized to post a reply.

          These Forums are dedicated to the 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. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
          2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
          3. 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.
          4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
          5. No Flaming or Trolling.
          6. No Profanity, Racism, or Prejudice.
          7. Site Moderators have the final word on approving / removing a thread or post or comment.
          8. 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