msbuild icon indicating copy to clipboard operation
msbuild copied to clipboard

Can't use .NET Core compatible task assemblies in Visual Studio

Open rainersigwald opened this issue 10 years ago • 4 comments

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.

rainersigwald avatar Apr 01 '16 21:04 rainersigwald

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.

AndyGerlicher avatar Apr 05 '16 22:04 AndyGerlicher

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!

halverson-dev avatar Jun 24 '16 00:06 halverson-dev

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?

rainersigwald avatar Jun 24 '16 15:06 rainersigwald

I verified that the binding redirects in the latest VS 2017 installation is correct.

jeffkl avatar Nov 29 '16 17:11 jeffkl