BuildTasks.Csc task could not be loaded from the assembly? BuildTasks.Csc task could not be loaded from the assembly? asp.net asp.net

BuildTasks.Csc task could not be loaded from the assembly?


It turns out that NuGet packages were committed to the repository and breaking everything. Deleting the project\project\packages directory from the repo solved all build problems since NuGet fetches the packages automatically on build.


I got this error when I created a new branch for my project.

It drove me crazy for an hour. I tried most of the suggestions over the internet including the accepted answer to this question.

I then closed the project, opened it again, cleaned it and the error is gone. So this means this could be cache issue.

Anyways, just wanted to share.


I too tried the top answer with no luck so deleted the contents of my bin and packages dir, closed and re-opened VS and everything fine now.