Can't use .NET Core compatible task assemblies in Visual Studio
You can build a task DLL that targets the xplat/.NET Core version of MSBuild and use it in command line builds, because we have a broad binding redirect set up.
Visual Studio 2015 (Update 2) has C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe.config, but that has a much narrower redirect range:
<bindingRedirect oldVersion="2.0.0.0-12.0.0.0" newVersion="14.0.0.0"/>
It should be possible to create a task DLL that works on .NET Core MSBuild, full-framework MSBuild, and in VS.
Team Triage: We'll get this fixed in VS for Update 3 (to include at least 14.1). This isn't a quick fix, but we didn't see anything else that could be done sooner.
It looks like this got fixed in Update 3. The binding redirects are now:
... oldVersion="2.0.0.0-99.9.9.9" newVersion="14.0.0.0" ...
However, the Dev15 Preview 3 redirect looks like this:
... oldVersion="2.0.0.0-14.0.0.0" newVersion="15.0.0.0" ...
Can we get that fixed as well?
Thanks!
I would expect codeflow from the update 3 branch elsewhere, but it doesn't appear that that's happened yet. Do you think we should do it manually @AndyGerlicher?
I verified that the binding redirects in the latest VS 2017 installation is correct.