Forum


HomeHomePremiumPremiumDevelopmentDevelopmentThe type or namespace name 'Entities' does not exist in the namespace 'DotNetNuke'The type or namespace name 'Entities' does not exist in the namespace 'DotNetNuke'
Previous
 
Next
New Post
2/9/2020 5:52 AM
 
Hi,

I've just upgraded a DNN site from 9.2 to 9.4 successfully.

The only issue is that a module I've developed isn't working.

I've tried recompiling with Visual Studio and I get 356 errors all with similar error messages to this:

"The type or namespace name 'Entities' does not exist in the namespace 'DotNetNuke' (are you missing an assembly reference?)"

I've checked that the dotnetnuke dll is still referenced and using the object browser I can see it has the Entities namespace.

Has anyone else encountered this issue?

I'm stuck for what to do at the moment.

Best Regards,

Steve
 
New Post
2/10/2020 11:19 PM
 
Hi,

One thing I've discovered is that the DNN requirements for 9.4 say a minimum Visual Studio 2015:
https://www.dnnsoftware.com/docs/deve...

I'm still using VS 2013 though I can't imagine it would cause this particular issue but I should at least try upgrading.

I did use 2013 with 9.2 successfully though I can't find the requirements for 9.2 to see if VS 2013 should have been OK. 

Regards,

Steve

 
New Post
2/11/2020 9:28 AM
 

One thing I should add is the line of code where this fails:

using DotNetNuke.Entities.Portals;

The error message as mentioned is:
Error 22
Description: The type or namespace name 'Entities' does not exist in the namespace 'DotNetNuke' (are you missing an assembly reference?)
File: C:\inetpub\wwwroot\dnn9_4dev\Website\DesktopModules\FlexiContent\EF\BackgroundImages\Image.cs
Line: 1
Column: 18
Project: EF

 

There are 356 similar errors in total.

 
New Post
2/11/2020 10:37 AM
 
A further observation, if I remove the using statement at the top of the class file:
using DotNetNuke.Entities.Portals;

And change the following line from:
return PortalController.Instance.GetCurrentPortalSettings().PortalId;

To:

return DotNetNuke.Entities.Portals.PortalController.Instance.GetCurrentPortalSettings().PortalId;

i.e. provide a full reference the PortalController in this case.

Then the error is resolved. So for some reason the using statement can't reference the namespace.

 
New Post
2/12/2020 3:29 AM
 

Hello,

I've managed to get my project to compile, thankfully.

I googled the error a few times and in general (not specifically for DNN) and the common thing mentioned was the targeted .Net framework version.

The minimum for DNN 9.4 (https://www.dnnsoftware.com/docs/developers/requirements.html) is 4.7.2 and my projects were set to 4.5.1.

Also, I was using visual studio 2013.

I installed VS 2015 (for now), with no changes I got even more errors including the ones already mentioned. I changed the targeted .Net framework version to 4.7.2 and the project recompiled successfully.

Though my app is still not working at least I can now debug it.

Best Regards,

Steve

 
Previous
 
Next
HomeHomePremiumPremiumDevelopmentDevelopmentThe type or namespace name 'Entities' does not exist in the namespace 'DotNetNuke'The type or namespace name 'Entities' does not exist in the namespace 'DotNetNuke'



Try FREE
30 days money back guaranteed