共用方式為


IMappedFolderCollection.Add 方法 (String, Boolean)

將具有指定部署路徑的對應資料夾新增至目前的 SharePoint 專案。

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

語法

'宣告
Function Add ( _
    deploymentPath As String, _
    skipAutoPackage As Boolean _
) As IMappedFolder
IMappedFolder Add(
    string deploymentPath,
    bool skipAutoPackage
)

參數

  • deploymentPath
    型別:System.String
    SharePoint 中對應所對應資料夾的路徑。這個路徑是 SharePoint 登錄區之根目錄的相對路徑。如果資料夾目前不存在,會在部署解決方案時建立。
  • skipAutoPackage
    型別:System.Boolean
    可自動將對應的資料夾新增至專案中的套件為 false ;否則則為 true。

傳回值

型別:Microsoft.VisualStudio.SharePoint.IMappedFolder
已建立的對應資料夾。

備註

當您使用這個方法建立對應資料夾,並指定未對應至標準對應資料夾位置的 deploymentPath 值時,對應資料夾的 FolderType 屬性值會是 Other

.NET Framework 安全性

請參閱

參考

IMappedFolderCollection 介面

Add 多載

Microsoft.VisualStudio.SharePoint 命名空間