Build/Test Issues

reflection issue

Started by witchdrash on 4,817 views

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

Edited

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.

Edited

Post a reply

Log in to reply.