The type or namespace name 'X' could not be found in unit tests #73509
-
Hi all,
A little bit of background.
I've explicitly added the reference to the test project:
My question is how is there a special way to add dependencies to my unit tests? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
This does not work. The reference belongs to the process that executes the test ("host"), not the code that's being compiled ("target"). When working with compilers, it's especially important to distinguish host and target. Don't use things from host process for compilation. You can search for examples of |
Beta Was this translation helpful? Give feedback.
This does not work. The reference belongs to the process that executes the test ("host"), not the code that's being compiled ("target"). When working with compilers, it's especially important to distinguish host and target. Don't use things from host process for compilation.
You can search for examples of
ReferenceAssemblies = ReferenceAssemblies.Net.Net60
or similar in roslyn repo.