visual studio won't recognize the picture file in the content

as you can see in the following link,i had another problem that was fixed,after that he couldn’t recognize the picture:

Did you add the content to the .mgcb with the pipeline tool? Are you using the MonoGameContentReference build action? In your bin folder, check if the file exists (under Content/start.xnb) and check the RootDirectory of the ContentManager you’re using, it should match the folder of the xnb.

the rootdirectory is Content

and i never had the use the pipeline tool

Yeah, we are going in circles… Could you post your whole code (if its not too big) ?

I will run it and see whats up…

Heh, I see you already mentioned the RootDir thing :stuck_out_tongue:

You did build and copy the content though, right? The xnb files should be in the bin/{Content.RootDirectory} directory if you want to be able to load them with the ContentManager. E.g. in this case the file you’re trying to load should be at ...../ProjectDir/bin/Debug/Content/start.xnb. The easiest way to handle content is to add it to the .mgcb with the pipeline tool and set the build action of the .mgcb file to MonoGameContentReference. That way content is automatically build and copied to your bin folder when you build the project.

thanks for the help guys!
just created the xnb files with the pipeline tool

but,for 1 pic it says that it was build for the wrong platform

ok, getting closer…

I gather the XNB files are platform specific, so you have to ensure all your content files are built for each platform.

I think you have some content, ‘blood’, built to target another platform, or maybe you have copied the blood xnb from a separate build folder belonging to a different platform…

I would just delete ‘blood’ from your project entirely, and rebuild it like you did the other images…
It’ll be like it never happened.

1 Like