AutoGenerateBindingRedirects doesn't work with unit tests

Viewed 892

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.

1 Answers

Use this:

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

You need both of them for unit test projects.

Related