Error while activating SharePoint enable reputation (Microsoft.SharePoint.Portal.ReputationHelper)

Copper Contributor

Hello folks ,

 

We are using below lines to activate rating feature, but it is giving error. We dont see enough help on this topic.

 

Assembly assembly = Assembly.Load("Microsoft.SharePoint.Portal, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c");
Type reputationHelper = assembly.GetType("Microsoft.SharePoint.Portal.ReputationHelper");
MethodInfo enableRatingMethod = reputationHelper.GetMethod("EnableReputation", BindingFlags.Static | BindingFlags.NonPublic);
enableRatingMethod.Invoke(null, new Object[] { list, "Ratings", true });

 

Error : Please see the screen shot below.

mbaig23_0-1711348379031.png

 

0 Replies