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