error while compiling the project

Ярослав Доронин 1 Reputation point
2021-09-02T13:44:24.737+00:00

Hello everyone. An error occurred while compiling the project. Here is the text that comes out for me:
Severity Code Description Project File String Suppression status
Error MSB4062 Unable to load task 'NuGet.Build.Tasks.GetRestoreProjectStyleTask' from assembly 'C: \ Program Files (x86) \ Microsoft Visual Studio \ 2019 \ Professional \ Common7 \ IDE \ CommonExtensions \ Microsoft \ NuGet \ NuGet.Build.Tasks. dll ". Could not load file or assembly 'Microsoft.Build.Utilities.v4.0, Version = 4.0.0.0, Culture = neutral, PublicKeyToken = b03f5f7f11d50a3a' or one of their dependencies. The specified file cannot be found. Verify that the <UsingTask> declaration is correct, that the assembly with all its dependencies is available, and that the task has a generic class that implements Microsoft.Build.Framework.ITask. WinFormsApp1 C: \ Program Files (x86) \ Microsoft Visual Studio \ 2019 \ Professional \ Common7 \ IDE \ CommonExtensions \ Microsoft \ NuGet \ NuGet.targets 467

Before that, everything was fine. And now it gives an error ...

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,117 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.