1

我正在关注关于 pex 和痣的教程(http://research.microsoft.com/en-us/projects/pex/pexsharepoint.pdf)。它一岁了,但一切都很好,直到我将 Mole 类型更改为 Behaved 类型。一旦我这样做了,'Run Pex Explorations' 命令开始抛出这个异常:

无法加载文件或程序集“System.Moles,Version=4.0.0.0,Culture=neutral,PublicKeyToken=0ae41878053f6703”或其依赖项之一。该系统找不到指定的文件。

我尝试了多种解决方案(包括Moles 和 SharePoint 行为类型)。我还尝试为 System 4.0.0.0 程序集生成 Moles,但由于多个“找不到合适的方法来覆盖”错误而失败。

我在 pex (0.94) 和 moles (1.0.0.0) 上使用最新版本。有什么解决办法吗?

4

1 回答 1

1

只需以这种方式为 System 创建一个痣:

<Moles xmlns="http://schemas.microsoft.com/moles/2010/">
  <Assembly Name="System" ReflectionOnly="true" />
  <StubGeneration Disable="true" />
</Moles>
于 2011-09-18T18:56:42.660 回答