Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

reflection issue
witchdrash
#1 Posted : Monday, July 17, 2017 3:35:21 PM(UTC)
Rank: Member

Groups: Registered
Joined: 8/28/2012(UTC)
Posts: 11
Location: Manchester

Thanks: 1 times
DependencyContext.Default.RuntimeLibraries does not return all the assemblies as the equivalent execution using dotnet test, it makes tests that use runtime reflection not function properly, does anyone have a solution to this?

Filtered dependency list with ncrunch (removed microsoft, system and runtime assembles):
castle.core
implementation.sprocrigger
Libuv
moq
ncrunch.taskrunner.dotnetcore.x64
NETStandard.Library
newtonsoft.json
simpleinjector
simpleinjector.integration.aspnetcore
simpleinjector.integration.aspnetcore.mvc
simpleinjector.integration.aspnetcore.mvc.core
sprocrigger
swashbuckle
swashbuckle.swagger
swashbuckle.swaggergen
swashbuckle.swaggerui
uglymapper
xunit

Filtered dependency list with resharper (or dotnet test, they're the same) (removed microsoft, system and runtime assembles):
castle.core
definitions.aqnetapi.proxy
definitions.common
definitions.documentparser
definitions.ioc
definitions.message.services
definitions.repositories
definitions.services
definitions.utils
entities.domain
entities.messages
helpers
implementation.access.sql
implementation.api.mvc
implementation.api.mvc.private
implementation.aqnetapi.proxy
implementation.base.api.mvc
implementation.ioc.simpleinjector
implementation.legacy.documentparser
implementation.legacy.utils
implementation.message.services
implementation.repositories.sql
implementation.services
implementation.sprocrigger
Libuv
moq
NETStandard.Library
newtonsoft.json
selfhost
simpleinjector
simpleinjector.integration.aspnetcore
simpleinjector.integration.aspnetcore.mvc
simpleinjector.integration.aspnetcore.mvc.core
sprocrigger
swashbuckle
swashbuckle.swagger
swashbuckle.swaggergen
swashbuckle.swaggerui
test.aquarium4api
uglymapper
xunit
Remco
#2 Posted : Monday, July 17, 2017 11:39:17 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,974

Thanks: 929 times
Was thanked: 1256 time(s) in 1169 post(s)
This is likely to be related to NCrunch's handling of the .deps file used to build the test environment.

This issue is probably the same one. You'll find a published build in this thread that will likely solve this problem.

I'm hoping to release v3.10 this week, which will include the above fix and will likely solve dependency inconsistencies.

Note that you'll need to have the 'Copy referenced assemblies to workspace' setting turn on for all projects in your solution if you want the above fix to work correctly.
Remco
#3 Posted : Tuesday, July 18, 2017 1:15:51 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,974

Thanks: 929 times
Was thanked: 1256 time(s) in 1169 post(s)
NCrunch v3.10 has now been released.
1 user thanked Remco for this useful post.
witchdrash on 7/28/2017(UTC)
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.040 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download