简体   繁体   中英

BuildTasks.csc not loaded in Visual Studio 2015

this question has been posted few times but the answers do nothing for me, here is what I get on compile:

Severity    Code    Description Project File    Line    Suppression State
Error       The "Microsoft.CodeAnalysis.BuildTasks.Csc" task could not be loaded from the assembly C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Build.Tasks.CodeAnalysis.dll. Could not load file or assembly 'file:///C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Build.Tasks.CodeAnalysis.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.

It worked before, now when I open it, I get this error.

I do not use a repository as some users suggest, I also restarted and cleaned the solution, deleting the nuget packages from the solution folder also does nothing.

Whats the problem here?

Hi your problem is that you are missing the reference to "Microsoft.CodeAnalysis.BuildTasks.Csc" file within your solution. If you have a backup of your project try and get the file from the previous backup in order to create the program executable again.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM