2016-11-19 96 views
0

我的多層項目有數據層,服務面板。 dataLayer引用到服務和引用到面板的服務。我曾在數據層的接口,有些東西一樣裝配參考

public interface IJournalEntity 
{ 
    ... 
} 

我的服務具有從IJournalEntity繼承的類,

public class OfflinePaymentService : IOfflinePaymentService, IJournalEntity 
{ 
...     
} 

當我編譯面板層,統一配置引發錯誤添加引用數據層,我怎麼能修復引用那個?

回答

1

沒有引用,你不能修復。如果您未參考該類型,則該類型對於您的項目而言是未知的。

一些類似的問題:

  1. Access interface methods without referring the class
  2. C# Use a class that implements an interface without adding a reference to the assembly that defines the interface

如果你的數據層是在一個單獨的DLL中定義,你需要把在Assets/Plugins/。這適用於Unity3D 4.x. 在Unity3D 5.x的,只是把DLL中Assets會工作。