The task factory “CodeTaskFactory” could not be loaded from the assembly “C:\ Program Files (x86)\ Microsoft Visual Studio\ 2017\ Professional\ MSBuild\ 15.0\ Bin\ Microsoft. Build. Tasks. v15.0 .dll”. Could not load file or assembly ‘file:/// C:\ Program Files (x86)\ Microsoft Visual Studio\ 2017\ Professional\ MSBuild\ 15.0\ Bin\ Microsoft.Build.Tasks.v15.0.dll’ or one of its dependencies. The system cannot find the file specified.
Nếu bạn tải thư viện mới trên nuget về và visual studio của bạn bị báo lỗi như trên thì nguyên nhân có thể là do NuGet packages bạn đang sử dụng cao hơn phiên bản MSBuild’s CodeTaskFactory. Bạn chỉ cần qua bên Nuget chọn tab Update để cập nhật package như hình dưới đây là ok
