问题
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.
I refer https://github.com/SWI-Prolog/contrib-swiplcs/blob/master/TestSwiPl/PlQuery.cs
This reference creates two errors,
1.Cannot resolve Assembly or Windows Metadata file 'System.Configuration.dll'
2.Type universe cannot resolve assembly: System.Configuration, version=2.0.0.0,..
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.
回答1:
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.
As for the System.Configuration
reference, you likely want v4 not v2.
For this, remove the reference and add a correct reference to v4.
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.
来源:https://stackoverflow.com/questions/28227983/error-related-to-microsoft-visualstudio-testtools-unittesting-namespace