[SOLVED] MonoGame 3.8 "Source file does not exist" for both FBX and OBJ

The content fails to build both FBX and OBJ mesh files with the error:
The source file 'G:/Projects/Game/Legacy/DragonSlayers/DragonSlayers/Content/Meshes' does not exist.
I’ve tried to put the files in various locations in the content hierarchy and verified the file is where the content build tool expects it to be (they were added in the MGCB Editor via Add Existing Item). Other content types (textures, effects, and sprite fonts) still work fine. But the meshes keep getting that error.

I’ve also tried this in a completely fresh project with no difference. When I double click the error in Visual Studio’s output log it even manages to open the file, so it’s definitely there.

Also tried reinstalling all of the content tools and building the content from the command line, neither makes a difference.

MonoGame version: 3.8
OS: Windows 10 (10.0.18363)
.NET Core SDK: 3.1.402

-Edit
Here’s the full output of running the content build in powershell:

> mgcb Content.mgcb
Build started 2020-09-26 16:35:28

Skipping G:/Projects/Game/Legacy/DragonSlayers/DragonSlayers/Content/Effects/TriEffect.fx
G:/Projects/Game/Legacy/DragonSlayers/DragonSlayers/Content/Meshes/CubeMesh.obj
        G:/Projects/Game/Legacy/DragonSlayers/DragonSlayers/Content/Meshes
G:/Projects/Game/Legacy/DragonSlayers/DragonSlayers/Content/Meshes/CubeMesh.obj: error: The source file 'G:/Projects/Game/Legacy/DragonSlayers/DragonSlayers/Content/Meshes' does not exist!
Skipping G:/Projects/Game/Legacy/DragonSlayers/DragonSlayers/Content/Textures/ayaya.png
Skipping G:/Projects/Game/Legacy/DragonSlayers/DragonSlayers/Content/Textures/TreeTile.png

Build 3 succeeded, 1 failed.

Time elapsed 00:00:00.21.

-Edit 2
I’ve also already tried a clean and rebuild within the mgcb editor

Can you build the content inside the mgcb-editor?

Building from the mgcb-editor is what I tried first, same errors there.

-Edit: I’ve also already tried a clean and rebuild

Which importer and processor is selected for the content for which it fails?

For the OBJ (can check for FBX later, will need to make one again):
Importer: Open Asset Import Library - MonoGame
Processor: Model - MonoGame

Try FBX importer for FBX and obj.

FBX file defaults to the Fbx Importer already.

I think I just found out why it’s failing, however.
The FBX model works, because I didn’t assign a material with a texture this time. Once I assigned a material with texture in Blender and tried importing that FBX it gave the error again. Just a material works fine too. It’s just the texture.

Problem solved I guess, can’t have a texture on the mesh. The error message is a bit misleading.

-Edit
Same thing applies to the OBJ, it works fine when there’s no texture on the material.

2 Likes

Thanks for the help!

1 Like