Hi,
We just migrated from 9.1. to DNN 9.2.2
I get the following errors : 1) Method not found: 'System.String DotNetNuke.Entities.Modules.ModuleInfo.get_Version()' 2) Method not found: 'System.String[] DotNetNuke.Security.Roles.RoleController.GetRolesByUser(Int32, Int32)'.
I read that DNN 9.2.2 has over 500 depricated methods removed. But how do I replace these methods with ?There are no suggestions in Visual Studio(I am using old version -VS 2013) I am working on Calendar Events(FlexEvents). Please let me know if I am not clear. Thank you for your time in advance.
Thanks.
If you compile against 9.1.1, you should see deprecation warnings (the members are totally removed in 9.2, so there's nowhere to include a message once you're compiling against a later version).
Looking at the 9.1.1 version of the platform, <code>ModuleInfo.Version</code> says Deprecated in DNN 5.0. Replaced by by DesktopModule.Version. <code>RoleController.GetRolesByUser</code> does not have a migration suggestion in its deprecation message (it's just Deprecated in DotNetNuke 6.2.), but the implementation is this: <code>UserId == -1 ? new string[0] : UserController.GetUserById(PortalId, UserId).Roles</code>, so it looks like the intention is to retrieve them via the <code>UserInfo</code> object.
Deprecated in DNN 5.0. Replaced by by DesktopModule.Version
Deprecated in DotNetNuke 6.2.
Hope it helps!
Hi Brian,
Thank you very much for the reply. Your second solution worked for me. For the first solution, when I write DesktopModule.Version, I get error that "DesktopModule does not exist in the current context" .Is there any dll i have to add to use this ?
The line where I get error is :
var objVersion = Version.Parse(ModuleContext.Configuration.Version); Thanks
On the <code>ModuleInfo</code> object (<code>ModuleContext.Configuration</code>), use the <code>DesktopModule</code> property to access the related <code>DesktopModuleInfo</code>, and then you'll be able to get to the property. Alternatively, use the <code>DesktopModuleController</code> class to get a <code>DesktopModuleInfo</code> instance without a <code>ModuleInfo</code>.
These Forums are for the discussion of the open source CMS DNN platform and ecosystem.
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.