Error Loading . File Not Found. Xna 4.0
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up XNA - File Not Found up vote 0 down vote favorite Can't find the answer anywhere, hoping you guys can help, thanks in advanced. These were loaded in the beginning of the file- SpriteBatch mBatch; Texture2D mTheQuantumBros2; protected override void LoadContent() { // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(GraphicsDevice); mBatch = new SpriteBatch(this.graphics.GraphicsDevice); //Create the Content Manager object to load images ContentManager aLoader = new ContentManager(this.Services); //Use the Content Manager to load the Cat Creature image into the Texture2D object mTheQuantumBros2 = aLoader.Load
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up File Not Found Error when loading an asset in XNA Game Studio 4.0 up http://stackoverflow.com/questions/16453077/xna-file-not-found vote 0 down vote favorite I am making a program for a school project and I am new to XNA Game Studio. For some reason even though the file is in Content. I am getting a ContentLoadException occured in Microsoft.Xna.Framework.dll on the code, spriteSheet = Content.Load
Start here for a quick overview of the site Help Center Detailed answers to any questions you might have http://gamedev.stackexchange.com/questions/58341/loading-images-in-xna-4-0-cannot-open-file-problems Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with http://www.dreamincode.net/forums/topic/258452-xna-file-not-found-error/ us Game Development Questions Tags Users Badges Unanswered Ask Question _ Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join error loading them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Loading images in XNA 4.0; “Cannot Open File” Problems up vote 1 down vote favorite Okay, I'm writing a game in C#/XNA 4.0 and am error loading . utterly stumped at my current juncture: Sprite animation. I understand how it works and have all the code in place, but my ContentLoader won't open my file... Basically, my directory looks like this: //WindowsGame1 - "Game1.cs" - //Classes - "NPC.cs" - Content Reference - //Images - "Monster.png" Inside my NPC class, I have all the essential drawing functions, i.e. LoadContent, Draw, Update. And I can get the game to find the correct file and attempt to open it, but when it tries, it throws an exception and tells me it can't open the file. This is how my code in my NPC class looks: Texture2D NPCImage; Vector2 NPCPosition; Animation NPCAnimation = new Animation(); public void Initialize() { NPCAnimation.Initialize(NPCPosition, new Vector2(4, 4)); } public void LoadContent(ContentManager Content) { NPCImage = Content.Load
1 of 1 New Topic/Question Reply 5 Replies - 2673 Views - Last Post: 05 December 2011 - 06:49 AM #1 litedrive D.I.C Head Reputation: 1 Posts: 102 Joined: 30-September 10 XNA File Not Found Error Posted 04 December 2011 - 06:25 PM I have the following Game1 class, which I altered a little bit (hehe, and may actually be the reason why this isn't working properly...): **Game1 Class** public class Game1 : Microsoft.Xna.Framework.Game { //GraphicsDeviceManager graphics; SpriteController _spriteController; GraphicsDevice graphicsDevice; ContentManager _contentManager; public Game1() { _contentManager = new ContentManager(new Chronos.Engine.Infrastructure.ServiceContainer()); _contentManager.RootDirectory = "Content"; } ///