Mar 24 2024 11:35 PM
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.