我正在开发一个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命名空间有关的错误
发布评论