简体   繁体   English

在Visual Studio 2010 Express中使用Moq框架

[英]Using moq framework in Visual Studio 2010 express

I want to use the moq framework with Visual Studio 2010 express. 我想将moq框架与Visual Studio 2010 Express一起使用。 The reason for not use Visual Studio 2012/2013 is that I have to develop my application in Windows XP. 不使用Visual Studio 2012/2013的原因是我必须在Windows XP中开发应用程序。

Since my VS version is express, I cannot use nuget package manager. 由于我的VS版本是Express版本,因此无法使用nuget软件包管理器。 Because of this, I need to obtain the moq frameork in a different way. 因此,我需要以另一种方式获得moq框架。

I have tried to download the source from GitHub and build it with a 2013 version of Visual Studio that I have in other PC. 我尝试从GitHub下载源代码,并使用其他PC上的2013版本Visual Studio进行构建。 The problem is that the latest version of moq framework needs, at least, .NET v4.0, but I need to build it for .NET v3.0, since I need a .dll I can use in WinXP. 问题在于,moq框架的最新版本至少需要.NET v4.0,但是我需要为.NET v3.0构建它,因为我需要可以在WinXP中使用的.dll。 I have tried to build moq for .NET v3.0 (with this VS 2013) but I have had a lot of errors. 我试图为.NET v3.0(使用此VS 2013)构建最小起订量,但是我遇到了很多错误。

My question is, how can I obtain a previous version of moq framework, which I can build for .NET v3.0? 我的问题是,如何获得可以为.NET v3.0构建的moq框架的早期版本?

I have downloaded the oldest version of moq (binaries) here https://code.google.com/p/moq/downloads/list?can=4&q=&colspec=Filename+Summary+Uploaded+ReleaseDate+Size+DownloadCount and needs a .NET version greater than 3.0. 我已经在这里https://code.google.com/p/moq/downloads/list?can=4&q=&colspec=Filename+Summary+Uploaded+ReleaseDate+Size+DownloadCount下载了最早的moq(二进制)。 .NET版本大于3.0。

I think it is not possible to use moq framework with .NET v3.0. 我认为无法将Moq框架与.NET v3.0一起使用。

EDIT: Yes, it's not possible: What are the predominant .NET 3.0 mocking frameworks? 编辑:是的,这是不可能的: 什么是主要的.NET 3.0模拟框架?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM