Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3752954
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T09:19:03+00:00 2026-05-19T09:19:03+00:00

I am very new to XNA and I began by following a tutorial that

  • 0

I am very new to XNA and I began by following a tutorial that draws an image on the screen.
I was able to move my image into the Content folder but when I try to use it in my code, it can’t be found.

I am using the asset name and I just cannot find what I am doing wrong.
The tutorials use XNA 3.0 and I am using Visual Studio 2010, not sure if that matters or not.

Here is my code

public class Game1 : Microsoft.Xna.Framework.Game
{
    Vector2 mPosition = new Vector2(0, 0);
    Texture2D mSpriteTexture;

    GraphicsDeviceManager graphics;
    SpriteBatch spriteBatch;

    public Game1()
    {
        graphics = new GraphicsDeviceManager(this);
        Content.RootDirectory = "Content";
    }


    protected override void Initialize()
    {
        base.Initialize();
    }

    protected override void LoadContent()
    {
        spriteBatch = new SpriteBatch(GraphicsDevice);

        mSpriteTexture = Content.Load<Texture2D>("Face");
    }


    protected override void UnloadContent()
    {
    }

    protected override void Update(GameTime gameTime)
    {

        if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed)
            this.Exit();


        base.Update(gameTime);
    }

    protected override void Draw(GameTime gameTime)
    {
        GraphicsDevice.Clear(Color.Black);

        spriteBatch.Begin();
        spriteBatch.Draw(mSpriteTexture, mPosition, Color.White);
        spriteBatch.End();

        base.Draw(gameTime);
    }
}

}

The error reads “ContentLoadException was Unhandled. File not found.

Solution Explorer

I hope this is enough information. Also the asset name of my file is Face.

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T09:19:04+00:00Added an answer on May 19, 2026 at 9:19 am

    If you’ve added your file to the Content project (those are new for 4.0) the other things to check would be to make sure the file is one of the supported formats for a Texture2D (.jpg, .png, .bmp, .tga). After that, click on the image and verify that the asset name is correct and matching the exact casing/spelling that you’re using in code to load it by that name. If that’s correct then also make sure that the Content Importer for the image is set correctly to be a Texture2D. And then another thing to verify would be to make sure you’re image is in the root of the Content project and not in a folder. If you have it in a folder, then you need to include the folder name (or names) when loading it.

    If you’ve verified all that then you may need to post an image or a sample project so that we can take a look and see if we spot anything that way.

    From that screenshot it looks like you need to right-click on the “Test” project and say “Add Content Reference”. You’ll then need to pick your “Test (Content)” project as that reference. That should have happened by default when you created this new game project and I’m not sure why it looks like it was removed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Very new to android and have just done a database tutorial and run into
Very new to XSL (and XML for that matter), but I need to step
Very new to using Raphael.js I'm looking at the tutorials and I am able
I am very new to XNA framework. I am writing a sample application in
Very new to xcode. I am working on with a table that when you
Very new to python, please excuse the noob question: I have a number that
Very new to iOS coding. I'd like to be able to display a modal
Very new to Android development, and I am importing a bitmap that is 799
I'am building a game in XNA, and I'am very new to XNA as well,
I am very new to Xna 4.0 game development on Windows and finding it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.