Error 22 The "EnsureBindingRedirects" task could not be loaded from the assembly
Asked Answered
H

5

35

I cloned a project with vs 2013. When I run it I get this error.

Error   1   The "EnsureBindingRedirects" task could not be loaded from the assembly D:\BMaster\packages\Microsoft.Bcl.Build.1.0.13\tools\Microsoft.Bcl.Build.Tasks.dll. Could not load file or assembly 'file:///D:\BMaster\packages\Microsoft.Bcl.Build.1.0.13\tools\Microsoft.Bcl.Build.Tasks.dll' or one of its dependencies. The system cannot find the file specified. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.   BargainMaster.Web
Harhay answered 5/2, 2014 at 10:17 Comment(0)
A
47

I'm not sure about root cause of this issue but it appeared when I added missing libraries by hand.

I resolved it by doing this:

  1. Delete <solution>\packages\Microsoft.Bcl.Build.1.0.13\
  2. Close solution
  3. Open solution
  4. Navigate to View / Other Windows / Package Manager Console
  5. Press Restore Packages in right top corner of the window
  6. Re-build
Appaloosa answered 21/2, 2014 at 14:20 Comment(5)
Edit: upgraded nuget, saw the button, but this didn't work for me :/Zebulon
I'd try to move packages (to somewhere else) and run nuget.exe restore path\to\my\solution.slnAppaloosa
I had a conflicted config file that was causing the issue. Resolving the conflicts fixed everything nicely.Dual
Yes!! tks my friendSelfcontained
This fixed my issue in Visual Studio Code w/ the C# (Omnisharp) plugin.Staunch
D
9

(For some reason none of the other answers worked for me.)

I resolved the issue by doing this:

  1. Delete the "packages" folder.
  2. Right click on the solution > Manage NuGet Packages or Solution.
  3. Downgrade Microsoft.Bcl.Build to a previous version 1.0.14. (Latest stable version at the moment of writing this is 1.0.21)
  4. Restore packages and rebuild.
Declarer answered 23/3, 2018 at 19:37 Comment(2)
Using VS2019, my solution was similar: downgrade Microsoft.Bcl.Build to 1.0.14, build [SUCCESS!], upgrade back to 1.0.21 and build again [also SUCCESS!].Encephalic
Yes, downgrading was the solution for me.Imogeneimojean
S
3

I just went to the Manage NuGet packages options for the particular VS project and updated the version of the Microsoft BCL nuget and it solved the problem for me.

Scansorial answered 17/11, 2014 at 21:49 Comment(1)
This worked for me in VS2019. Updating from 1.0.14 to 1.0.21. Seems like an obvious solution but I wouldn't have thought of it without this thread. The solution to delete and restore the existing version did not work.Trocki
B
0

Verify that you have Nuget Package Manager installed. By default, Visual Studio 2010 doesn't have it (later versions do) - Open Tools / Extension Manager - Search for Nuget Package Manager and click Download - After this I had to remove the Nuget package (Microsoft.Bxl.Async, Microsoft.BCL, and Microsoft.Bcl.Build) causing the error, restart VS and re-add the package.

Barriebarrientos answered 23/9, 2018 at 16:49 Comment(0)
S
0

The above answer didn't work for me. I just had to remove references (in packages and proj file) to Microsoft.Bcl.Build.. Rebuilt and succeeded.

Sabo answered 28/9, 2018 at 13:29 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.