便携式图书馆代码合同 [英] Portable Library Code Contract

查看:89
本文介绍了便携式图书馆代码合同的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows 8 Metro解决方案中使用了可移植的库。

I use the portable Library inside a Windows 8 Metro solution.

我想使用简单的代码合同指令(Contract.Assume等),但它似乎是portable Library不知道System.Diagnostics.Contracts命名空间......

I want to use trivial code contract instructions (Contract.Assume, etc.) but it seems that the portable Library does not know the System.Diagnostics.Contracts namespace...

我该怎么办?

谢谢你
Yves Pflieger

Thanks
Yves Pflieger

Yves Pflieger

Yves Pflieger

推荐答案

请参阅文档中的第1节。您应该能够添加对我们的安装附带的程序集的引用,该程序集具有Contract类的定义。在v4中将类添加到mscorlib之前我们使用了它。

See Section1 in the documentation. You should be able to add a reference to the assembly that ships with our installation that has the definition of the Contract class. We used that before the class was added to mscorlib back in v4.

如果有效,请告诉我。


这篇关于便携式图书馆代码合同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆