共用方式為


IPackageManifest.SharePointProductVersion 屬性

取得或設定此方案所針對的 SharePoint 目標版本。

命名空間:  Microsoft.VisualStudio.SharePoint.Packages
組件:  Microsoft.VisualStudio.SharePoint (在 Microsoft.VisualStudio.SharePoint.dll 中)

語法

'宣告
Property SharePointProductVersion As String
string SharePointProductVersion { get; set; }

屬性值

型別:System.String
表示版本號碼的字串值。

備註

SharePoint 會使用這個屬性來判斷的 SharePoint 解決方案所針對的版本。兩個目前的有效值為 12.0 以及 14.0。12.0 的值表示是針對 Windows SharePoint Services 3.0 或 Microsoft Office SharePoint Server 2007 所設計的項目,而 14.0 表示是針對 SharePoint Foundation 2010 或 SharePoint Server 2010 所設計的項目。如需詳細資訊,請參閱從現有的 SharePoint 網站匯入項目

.NET Framework 安全性

請參閱

參考

IPackageManifest 介面

Microsoft.VisualStudio.SharePoint.Packages 命名空間