与Microsoft.VisualStudio.TestTools.UnitTesting命名空间有关的错误

编程入门 行业动态 更新时间:2024-10-25 04:15:04
本文介绍了与Microsoft.VisualStudio.TestTools.UnitTesting命名空间有关的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在开发一个Windows store应用,该应用接受用户输入(数学问题),使用prolog处理它并输出答案.我已添加Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll作为对Windows Store应用程序的引用.

I am developing a windows store app which take the user input(mathematical question),process it using prolog and output the answer. I have add Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll as an reference to my windows Store app.

我指的是 github/SWI-Prolog/contrib-swiplcs/blob/master/TestSwiPl/PlQuery.cs

此参考文献会产生两个错误,

This reference creates two errors,

1.无法解析程序集或Windows元数据文件'System.Configuration.dll'

1.Cannot resolve Assembly or Windows Metadata file 'System.Configuration.dll'

2.Type Universe无法解析程序集:System.Configuration,版本= 2.0.0.0,..

2.Type universe cannot resolve assembly: System.Configuration, version=2.0.0.0,..

我可以解决此错误吗?还是无法在Windows应用商店应用中将其用作参考.我正在使用Visual Studio 2013.

Can I solve this error or Is it not possible to use this as a reference in windows store app. I'm using visual studio 2013.

推荐答案

您不应从要部署的任何生产程序集中引用Microsoft.VisualStudio.QualityTools.UnitTestFramework程序集.只能从测试项目中引用它.

You should not reference the Microsoft.VisualStudio.QualityTools.UnitTestFramework assembly from any production assemblies you're deploying. It should only be referenced from test projects.

删除参考并修复所有构建错误.如果这是根本原因,请将单元测试移到单元测试项目中.单元测试不应位于部署项目的内部.

Remove the reference and fix any build errors. Move unit tests into a unit test project if that's the root cause. Unit Tests should not be located inside a deployment item.

对于System.Configuration参考,您可能希望v4而不是v2.

As for the System.Configuration reference, you likely want v4 not v2.

为此,请删除参考,并为v4添加正确的参考.

For this, remove the reference and add a correct reference to v4.

如果System.Configuration引用不是您的,而是来自您引用的程序集的绑定,则可能需要绑定重定向.作为参考,您可能需要查看重定向程序集版本在MSDN上.

If the System.Configuration reference is not yours, but instead a binding from an assembly you are referencing, you likely need a binding redirect. For reference you may want to review Redirecting Assembly Versions on MSDN.

HTH.

更多推荐

与Microsoft.VisualStudio.TestTools.UnitTesting命名空间有关的错误

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

发布评论

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

>www.elefans.com

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