共用方式為


Workspace.ApplyProjectReferenceAdded(ProjectId, ProjectReference) 方法

定義

這個方法會在 期間 TryApplyChanges(Solution) 呼叫,以將專案參考新增至專案。

覆寫這個方法以實作新增專案參考的功能。

protected:
 virtual void ApplyProjectReferenceAdded(Microsoft::CodeAnalysis::ProjectId ^ projectId, Microsoft::CodeAnalysis::ProjectReference ^ projectReference);
protected virtual void ApplyProjectReferenceAdded (Microsoft.CodeAnalysis.ProjectId projectId, Microsoft.CodeAnalysis.ProjectReference projectReference);
abstract member ApplyProjectReferenceAdded : Microsoft.CodeAnalysis.ProjectId * Microsoft.CodeAnalysis.ProjectReference -> unit
override this.ApplyProjectReferenceAdded : Microsoft.CodeAnalysis.ProjectId * Microsoft.CodeAnalysis.ProjectReference -> unit
Protected Overridable Sub ApplyProjectReferenceAdded (projectId As ProjectId, projectReference As ProjectReference)

參數

projectId
ProjectId
projectReference
ProjectReference

適用於