我在我的應用程序中創建了2個虛擬項目,並將它們命名爲BAL
和DAL
。當我構建它們時,它們會成功構建。如果我在DAL
項目中添加對BAL
的引用,它會很好地添加。但同時加入了DAL
參考BAL
項目,我得到以下錯誤:由於循環依賴錯誤,無法添加項目引用
A reference to DAL could not be added. Adding this project as a reference would cause a circular dependency.
誰能幫我解決這個問題?
只需在Google快速搜索中嘗試一些頂級條目即可。 http://en.wikipedia.org/wiki/Circular_dependency。在http://stackoverflow.com/questions/308915/why-are-circular-references-in-visual-studio-a-bad-practice在SO另一個問題很好解釋 –