Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AutoGenerateBindingRedirects doesn't work with unit tests

Tags:

c#

mstest

Why doesn't this work in unit test projects?

<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>

I still get "Could not load file or assembly" errors if I don't add explicit binding redirects.

like image 753
Jonathan Allen Avatar asked Oct 04 '17 18:10

Jonathan Allen


1 Answers

Use this:

<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>

You need both of them for unit test projects.

like image 75
Jonathan Allen Avatar answered Oct 24 '22 06:10

Jonathan Allen