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.
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! 👍🏽
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.
Posted By Stephane Tetard on 9/8/2023 5:32 AM Thank you for your support.
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.
I'll made others tests soonly.
Please update us when you're done. 🤔
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:
Awesome! Simply post in the forums using the link below and we'll get you started.