C
C#2d ago
NormalMoon

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.
No description
16 Replies
333fred
333fred2d ago
Show your csproj. But I'm guessing you're using an old-style project file, which is not supported by dotner build
NormalMoon
NormalMoonOP2d ago
No description
NormalMoon
NormalMoonOP2d ago
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
333fred
333fred2d ago
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
NormalMoon
NormalMoonOP2d ago
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.
333fred
333fred2d ago
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
NormalMoon
NormalMoonOP2d ago
open debug window?
333fred
333fred2d ago
Yes. The 4th window on the side
NormalMoon
NormalMoonOP2d ago
No description
NormalMoon
NormalMoonOP2d ago
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
333fred
333fred2d ago
What is the default option you see
NormalMoon
NormalMoonOP2d ago
Select Debugger C# (suggested) fixed it
333fred
333fred2d ago
What fixed it?
NormalMoon
NormalMoonOP2d ago
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
sanic
sanic2d ago
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.
NormalMoon
NormalMoonOP2d ago
It's cool I'm here to be a labrat I hope I helped improve something in a way

Did you find this page helpful?