Solution.WithProjectReferences 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
使用指定的專案來建立新的方案實例,以包含指定的專案參考清單。
public:
Microsoft::CodeAnalysis::Solution ^ WithProjectReferences(Microsoft::CodeAnalysis::ProjectId ^ projectId, System::Collections::Generic::IEnumerable<Microsoft::CodeAnalysis::ProjectReference ^> ^ projectReferences);
public Microsoft.CodeAnalysis.Solution WithProjectReferences (Microsoft.CodeAnalysis.ProjectId projectId, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.ProjectReference> projectReferences);
public Microsoft.CodeAnalysis.Solution WithProjectReferences (Microsoft.CodeAnalysis.ProjectId projectId, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.ProjectReference>? projectReferences);
member this.WithProjectReferences : Microsoft.CodeAnalysis.ProjectId * seq<Microsoft.CodeAnalysis.ProjectReference> -> Microsoft.CodeAnalysis.Solution
Public Function WithProjectReferences (projectId As ProjectId, projectReferences As IEnumerable(Of ProjectReference)) As Solution
參數
- projectId
- ProjectId
要取代 projectReferences
為 之參考的專案識別碼。
- projectReferences
- IEnumerable<ProjectReference>
新的專案參考。
傳回
例外狀況
projectReferences
包含 null
。
projectReferences
包含重複的專案。
方案不包含 projectId
。