2
我有一个WebApplication作用域功能,需要通过代码进行安装。通过代码安装WebApplication作用域功能 - SharePoint
总之,我需要通过代码来执行
stsadm -o installfeature -name MyFeature
。有任何想法吗?
我有一个WebApplication作用域功能,需要通过代码进行安装。通过代码安装WebApplication作用域功能 - SharePoint
总之,我需要通过代码来执行
stsadm -o installfeature -name MyFeature
。有任何想法吗?
试试这个代码:
public void InstallFeature(string name, bool force)
{
string relativePath = name + @"\feature.xml";
Microsoft.SharePoint.Administration.SPFarm.Local.FeatureDefinitions.Add(relativePath, Guid.Empty, force);
}
查看Codeplex上SharePoint Solution Installer的代码。