[Solved] Help compiling new project -- The "MonoGame.Build.Tasks.CollectContentReferences" task could not be loaded from the assembly

I’m trying to give Monogame a try out. I’m using Visual Studio Community 2017 for my IDE and am creating a new Monogame Windows project using a fresh installation of Monogame 3.6 . I am using Windows 8.1 .

Unfortunately as soon as I create the project and try to compile, I get this build error:

**1>------ Build started: Project: Game3, Configuration: Debug x86 ------**

** 1>C:\Program Files (x86)\MSBuild\MonoGame\v3.0\MonoGame.Content.Builder.targets(40,5): 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. 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.**
** ========== Build: 0 succeeded or up-to-date, 1 failed, 0 skipped ==========**

Now I’m looking in my files and I see that I do indeed have MonoGame.Build.Tasks.dll, however it is not directly in the …\v3.0\ folder but in …\v3.0\Tools instead.

Does anyone knows how I can fix this? I tried dragging all the files from Tools up a directory but that didn’t solve anything.

Thanks!

I would just use the dev build to start off with.

on the git hub page for monogame you scroll down to the big bold letters
Builds
Under that is like 6 different things typically i click the one that says
package windows (though im on win7 i think that one is for both)
click on the newest successful build and you should just get a installer you can download under artifacts.
for example.
http://teamcity.monogame.net/viewLog.html?buildId=54269&tab=artifacts&buildTypeId=MonoGame_PackagingWindows

Id just uninstall the current monogame you have and try the nightly its probably the quickest fix.
If it doesn’t work post back the guys who are good with the installers browse the forums too.

Thanks, unfortunately doing this does not yield me any different results. I tried out version 3.7.0.879.

I had the same issue yesterday and started a thread. I solved it in end by just copying the .dll and restarting vs. Maybe is of help?


:wink:

Thanks for everyone who helped! Moving that one file up a directory and restarting VS seems to have helped, I can now compile and launch the beautiful blue box on startup now.