c# - Unittest for a PCL - LINQ method fails -


we use ttd , xamarin use nunit that. in our project have pcl , monodroid/montouch project. have ios , android integrationtest-projects (with nunit special testrunner).

my problem real unittests (the fast ones executed not in simulator) use ttd don't work pcl (and there it's important) use linq-extension-methods example

enumerable.any() 

the exception always:

could not load file or assembly system.core 2.0.5.0 

if don't use linq methods, works fine... maybe info: in integrationtest-projects can execute tests without problem, our without linq extensions.

the pcl looks that:

<projecttypeguids>{786c830f-07a1-408b-bd7f-6ee04809d6db};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</projecttypeguids> <outputtype>library</outputtype> <rootnamespace>xylib</rootnamespace> <assemblyname>xylib</assemblyname> <targetframeworkprofile>profile136</targetframeworkprofile> <targetframeworkversion>v4.0</targetframeworkversion> 

and unittest-project xamarin-studio "nunit library project" (we tried lot of other project-types without success).

i spent lot of time googling problem. according post, should work way: how run unit tests xamarin library projects (ios , android)?

can me this? or not possible?

do unit tests fail when use linq extensions in unit test code or in pcl code that's being called unit tests?

if you're returning deferred linq query pcl , applying linq extension different version of linq, see there might trouble. in case, try using .tolist() force query execute before apply unit test-specific linq code.


Comments

Popular posts from this blog

java - Intellij Synchronizing output directories .. -

git - Initial Commit: "fatal: could not create leading directories of ..." -