Skip to content

Multiple projects with tests in single test session #1662

Answered by thomhurst
jorgeparavicini asked this question in Q&A
Discussion options

You must be logged in to vote

Probably due to how .NET loads assemblies. My understanding is an assembly only gets loaded when a type or something from it is first referenced.

In your main project that will be the runner, try creating a [Before(TestDiscovery)] and then inside it reference types from your referencing projects. Even a console write line should do it.

E.g.

Console.WriteLine($"Loading assembly {typeof(SomeType).Assembly}"

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jorgeparavicini
Comment options

Answer selected by jorgeparavicini
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants