I\'ve some problem when using .net standard in .net framework 4.6.2 consoleapps.
I could reduce the problem to this: Given:
I create a .net standard 1.5 clie
I found that adding the NETStandard.Library did not work for me, but ensuring that binding redirects were generated on build did the trick. For that you should ensure that you have
true
somewhere in your project file. This should work for console or web apps. If you're having problems running unit tests, you can use this:
true
true
The GenerateBindingRedirectsOutputType is necessary as the unit tests are contained in a class library which doesn't have executable output by default, so this forces any redirect configuration to be written into the build artifacts, ready to be used when the tests are executing.
You can find more details of the issues involved here: https://github.com/dotnet/announcements/issues/31