我剛剛將最新版本的源代碼下載到Microsoft企業庫。當我試圖建立在Visual Studio 2010的解決方案,我收到以下錯誤:Moq在Microsoft數據訪問應用程序塊
The type or namespace name 'Moq' could not be found (are you missing a using directive or an assembly reference?)
什麼是起訂量和我在哪裏可以找到組件
我剛剛將最新版本的源代碼下載到Microsoft企業庫。當我試圖建立在Visual Studio 2010的解決方案,我收到以下錯誤:Moq在Microsoft數據訪問應用程序塊
The type or namespace name 'Moq' could not be found (are you missing a using directive or an assembly reference?)
什麼是起訂量和我在哪裏可以找到組件
Moq (pronounced "Mock-you" or just "Mock") is the only mocking library for .NET developed from scratch to take full advantage of .NET 3.5 (i.e. Linq expression trees) and C# 3.0 features (i.e. lambda expressions) that make it the most productive, type-safe and refactoring-friendly mocking library available. And it supports mocking interfaces as well as classes. Its API is extremely simple and straightforward, and doesn't require any prior knowledge or experience with mocking concepts.
組裝方法here.您可能需要3.1二進制文件。
除了從http://code.google.com/p/moq/下載DLL文件之外,您需要將它們添加到VS中的應用程序的bin引用中。在VS中,右鍵單擊References並選擇Add Reference。
在EntLib50Src \ Lib \ ThirdParty \ Moq下有一個readme.txt文件,它解釋瞭如何獲取MOQ程序集。 – 2010-10-20 19:42:17