Trouble getting started with MonoGame - "MonoGame.Build.Tasks.CollectContentReferences" [solved]

I was hoping to solve this myself but googling around hasn’t got me any further.

I have tried both VS 2015 and 2017 to no success. The error reported is same in both cases, it seems to be missing a .dll for x86. The error reads:-

Severity Code Description Project File Line Suppression State
Error The “MonoGame.Build.Tasks.CollectContentReferences” task could not be loaded from the assembly C:\Program Files (x86)\MSBuild\MonoGame\v3.0\MonoGame.Build.Tasks.dll. Could not load file or assembly ‘file:///C:\Program Files (x86)\MSBuild\MonoGame\v3.0\MonoGame.Build.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. Game10

I have also tried both the stable and dev releases of MonoGame and have the same result.

Got the same error with the latest build 879, 876 did it too, whereas it worked with build 828.
VS2017 15.3.3

Severity Code Description Project File Line Suppression State
Error MSB4062 The “MonoGame.Build.Tasks.CollectContentReferences” task could not be loaded from the assembly C:\Program Files (x86)\MSBuild\MonoGame\v3.0\MonoGame.Build.Tasks.dll. Could not load file or assembly ‘file:///C:\Program Files (x86)\MSBuild\MonoGame\v3.0\MonoGame.Build.Tasks.dll’ or one of its dependencies. Le fichier spécifié est introuvable. 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. GameGenerateRoughnessMap C:\Program Files (x86)\MSBuild\MonoGame\v3.0\MonoGame.Content.Builder.targets 40

It crashes on my 3 “exe” projects while having installed the 828 it builds nicely.

It seems it just is a case the file has been moved to the tools directory. Moving said .dll from /Tools to its parent directory solved this for me. I’m sure there is a proper solution but this is good enough for me at the moment.

For clarity my folder now looks like this:-

*edit - make sure to restart VS after doing this

So it would be a problem in the installer ?
Thanks, I’ll try as soon as I can

Did it change for good in the installer and templates and as we are using projects created before the change the path is still pointing at the wrong place?

I set up everything fresh, I have never used MonoGame before and I even had to reinstall Visual Studio, so its not an issue of old project. I’d assume there has been a change that moves these files into tools, and somewhere the link hasn’t been updated. But I’m the wrong person to ask here :wink:

Ok, the error vanished, but it now takes ages to build the project, with the mgcb build deactivated or not, same problem.

This is fixed in the latest build :wink: