@Mikesome_13 wrote:
I am trying to load an effect file called effects.fx, but it keeps returning this error:
'Microsoft.Xna.Framework.Content.ContentLoadException was unhandled
HResult=-2146233088
Message=The content file was not found.
Source=MonoGame.Framework
StackTrace:
at Microsoft.Xna.Framework.Content.ContentManager.OpenStream(String assetName)
at Microsoft.Xna.Framework.Content.ContentManager.ReadAsset[T](String assetName, Action`1 recordDisposableObject)
at Microsoft.Xna.Framework.Content.ContentManager.Load[T](String assetName)
at Flight_Sim.Game1.LoadContent() in G:\C#\Flight Sim\Flight Sim\Game1.cs:line 50
at Microsoft.Xna.Framework.Game.Initialize()
at Flight_Sim.Game1.Initialize() in G:\C#\Flight Sim\Flight Sim\Game1.cs:line 37
at Microsoft.Xna.Framework.Game.DoInitialize()
at Microsoft.Xna.Framework.Game.Run(GameRunBehavior runBehavior)
at Microsoft.Xna.Framework.Game.Run()
at Flight_Sim.Program.Main() in G:\C#\Flight Sim\Flight Sim\Program.cs:line 18
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException: System.IO.FileNotFoundException
HResult=-2147024894
Message=Content\effects.xnb
Source=MonoGame.Framework
StackTrace:
at Microsoft.Xna.Framework.TitleContainer.OpenStream(String name)
at Microsoft.Xna.Framework.Content.ContentManager.OpenStream(String assetName)
InnerException: System.IO.DirectoryNotFoundException
HResult=-2147024893
Message=Could not find a part of the path 'G:\C#\Flight Sim\Flight Sim\bin\Windows\x86\Debug\Content\effects.xnb'.
Source=mscorlib
StackTrace:
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at System.IO.File.OpenRead(String path)
at Microsoft.Xna.Framework.TitleContainer.PlatformOpenStream(String safeName)
at Microsoft.Xna.Framework.TitleContainer.OpenStream(String name)
InnerException: 'Any suggestions on how to fix it?
Posts: 4
Participants: 2