尝试在测试项目中使用IValueconverter时出错

编程入门 行业动态 更新时间:2024-10-17 05:27:09
本文介绍了尝试在测试项目中使用IValueconverter时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一个Windows Phone 8项目和一个测试项目.在我的Windows Phone项目中,我有一个名为BoolToIntConverter的转换器类,该类继承了IValueConverter.现在,我需要编写一个测试方法来测试BoolToIntConverter的convert方法. 但是在我的测试项目中,当我创建BoolToIntConverter的对象时,它向我抛出了一个构建错误,提示说: 您必须添加对程序集"system.windows"的引用,版本= 2.0,6.0

I have one windows phone 8 project and a test project .In my windows phone project I am having a converter class named BoolToIntConverter which inherits the IValueConverter. Now I need to write a test method for testing the convert method of BoolToIntConverter. But in my test project while I am creating an object of theBoolToIntConverter ,it is throwing me an build error saying "you must add a reference to assembly "system.windows" version =2.0,6.0

如何解决这个问题.

推荐答案

您是否已编辑测试项目参考,并在程序集"中搜索"system.windows" ;,然后选中该框并应用?您的测试项目必须具有与测试项目相同的参考(实际上是每个有效使用的参考),此外 一些专用于测试的软件. Did you edit the test projet reference and in "assemblies", search for "system.windows", then check the box and apply? Your test project must have the same references as you tested project (in fact every effectively used ones), plus some ones dedicated to testing.

更多推荐

尝试在测试项目中使用IValueconverter时出错

本文发布于:2023-11-17 08:45:25,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1609506.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:测试   项目   IValueconverter

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!