ERROR MSB4025
Hello I'm using Visual studio Code with C# Dev kit extension. I'm trying to build MonoGames tutorial game. But when I attempt to run my code I receive, "Build Failures".
My terminal states that /media/erobros/CodeProjects/DungeonSlime/DungeonSlime/Game1.cs(1,1): erro MSB4025: The project file could not be loaded. Data at the root level is invalid. Line 1, position 1.
This is reproduced anytime I attempt to run the code. I even deleted the entire project and remade it and still am receiving the same error. My CodeProjects partition is on my secondary NVME it has plenty of space I'm afraid I may have gummed something up.
My OS is Linux.

16 Replies
Show your csproj. But I'm guessing you're using an old-style project file, which is not supported by dotner build

I will note doing a dotnet --info prompt into the Terminal reports back that I don't have a global.json file
Other architectures found:
None
Environment variables:
Not set
global.json file:
Not found
Can you show the command you're using to build?
I'm seeing "File-based app" in the status bar there that isn't correct
I press the run button
It is located in a file though.
I type .NET New Project in the Command Palette and choose the .NET New Project command
then choose the MonoGame Cross-Platform Desktop Application project template.
After choosing the template, a dialog window will appear asking you to choose a location to save the project, this is a folder where your projects will be created by default.
Open the debug window on the side, and show what is selected for running
@rikki and @Jan Jones, as I'm guessing this may be related to the recent changes to support file-based apps
open debug window?
Yes. The 4th window on the side

when I hit run and debug I'm given options
I've been picking the default option but that doesn't seem to help
Don't leave me. I'm scared of my IDE
What is the default option you see
Select Debugger
C# (suggested)
fixed it
What fixed it?
I rubbed my 2 braincells together
Run debugger I selected further C# options
One option is
C#: Launch Startup Project
using this launch option fixes the issue
Sorry for burning your time I'm kinda slow
This may represent a real bug or at least usability issue in the tooling though.
It feels unexpected for the editor to suggest debugging as a file based app, when the file is part of an opened project, even if there are no debug configurations already.
It's cool I'm here to be a labrat
I hope I helped improve something in a way