0
votes

Yesterday I updated my visual studio 2017 from version 15.6.4 to 15.6.6 and then this error occured when i tried to run my program. Help me fix this please, i have no idea what to do. Please provide step by step procedure, thank you.

The "GetDependsOnNETStandard" task could not be loaded from the assembly C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\tools\net46\Microsoft.NET.Build.Extensions.Tasks.dll. Could not load file or assembly 'file:///C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\tools\net46\Microsoft.NET.Build.Extensions.Tasks.dll' or one of its dependencies. The system cannot find the file specified. Confirm that the 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.

2
Are you able to reproduce this with a small sample application? I'd start with a simple "hello world" with a project configuration that looks similar to your real one, e.g. targeting the same version of .NET.Jon Skeet
A bit of advice: Do not run to download once you see these frequent updates, unless you have a problem you think that update would fix!Bassem Akl
Thanks for answering guys. The problem is fixed by the VS team by their latest update.JP Bustillo
I'm at VS version 16.3.3 and got this error today. A restart, clean, and rebuild fixed it. A clean and rebuild without restarting didn't fix it. This is one of the few times a restart of VS fixed something for me!amartin

2 Answers

0
votes

Try to execute the command: "git clean -fdx" to clean up some (possible) trash file on your git repo.

Works for me.

0
votes

I had the same error. In my case, the error occurred because the one of my library assemblies which are downloaded was 0 bytes in size. This meant the reference in visual studio was set, but the assembly was actually just an empty file.