I wasn’t the one who said it fyi. I was just linking to another thread as this is a recurring issue, you have to read that, I never had the issue personally.
As far as I understand the .mgcb task has a mistake in the config file, where if the the path to the nuget package has a space in it, the OS will be unable to resolve the path, because when it finds a space it assums the command has ended.
So if your path is something like C:\Users\Fran Vera\.nuget\packages, it will obviously fail because there’s a space in Fran Vera, but if you wrapped it in quotation marks "C:\Users\Fran Vera\.nuget\packages" the command line will interpret it as a full command.
Just popping in here to say Hi to @VR_Francisco and @box Welcome to the Community!
And yes, if you are using a local account with a space in your username, expect this to be a thing. as far as I am aware, when you use a live account [Hotmail/Outlook/Whatever] it is not an issue…
I would like to add my fix to this (or at least similar-looking) problem:
Install the “.NET Core 3.1 Runtime” component in visual studio installer. This solved a very similar error message with the MonoGame.Content.Builder.Task.targets file.
I use the great MonoGame.Content.Builder.Task nuget package, which I guess is built with .net core 3.1.