1. This forum is archived for reference. For support & bug reports visit the help section of forums.stardewvalley.net

Bug/Issue Please Help

Discussion in 'Support' started by Tsham, Jan 18, 2018.

  1. Tsham

    Tsham Space Hobo

    I have been dealing with this issue every time I want to play the game. I don't know what I do, but sometimes I get the game to work, but then it crashes the next day I try to play.


    Message: The type initializer for 'StardewValley.SaveGame' threw an exception.
    InnerException: System.IO.FileNotFoundException: Could not find file 'C:\Users\T\AppData\Local\Temp\hnsy3yoe.dll'.
    File name: 'C:\Users\T\AppData\Local\Temp\hnsy3yoe.dll'
    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, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
    at System.IO.File.InternalReadAllBytes(String path, Boolean checkHost)
    at System.IO.File.ReadAllBytes(String path)
    at Microsoft.CSharp.CSharpCodeGenerator.FromFileBatch(CompilerParameters options, String[] fileNames)
    at Microsoft.CSharp.CSharpCodeGenerator.FromSourceBatch(CompilerParameters options, String[] sources)
    at Microsoft.CSharp.CSharpCodeGenerator.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromSourceBatch(CompilerParameters options, String[] sources)
    at System.CodeDom.Compiler.CodeDomProvider.CompileAssemblyFromSource(CompilerParameters options, String[] sources)
    at System.Xml.Serialization.Compiler.Compile(Assembly parent, String ns, XmlSerializerCompilerParameters xmlParameters, Evidence evidence)
    at System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, Evidence evidence, XmlSerializerCompilerParameters parameters, Assembly assembly, Hashtable assemblies)
    at System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, String location, Evidence evidence)
    at System.Xml.Serialization.XmlSerializer.GenerateTempAssembly(XmlMapping xmlMapping, Type type, String defaultNamespace, String location, Evidence evidence)
    at System.Xml.Serialization.XmlSerializer..ctor(Type type, XmlAttributeOverrides overrides, Type[] extraTypes, XmlRootAttribute root, String defaultNamespace, String location, Evidence evidence)
    at System.Xml.Serialization.XmlSerializer..ctor(Type type, Type[] extraTypes)
    at StardewValley.SaveGame..cctor()
    Stack Trace: at StardewValley.SaveGame.<Save>d__47.MoveNext()
    at StardewValley.Menus.SaveGameMenu.update(GameTime time)
    at StardewValley.Game1.Update(GameTime gameTime)
    at Microsoft.Xna.Framework.Game.Tick()
    at Microsoft.Xna.Framework.Game.HostIdle(Object sender, EventArgs e)
    at Microsoft.Xna.Framework.GameHost.OnIdle()
    at Microsoft.Xna.Framework.WindowsGameHost.RunOneFrame()
    at Microsoft.Xna.Framework.WindowsGameHost.ApplicationIdle(Object sender, EventArgs e)
    at System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FDoIdle(Int32 grfidlef)
    at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
    at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
    at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
    at System.Windows.Forms.Application.Run(Form mainForm)
    at Microsoft.Xna.Framework.WindowsGameHost.Run()
    at Microsoft.Xna.Framework.Game.RunGame(Boolean useBlockingRun)
    at StardewValley.Program.Main(String[] args)


    Please help I really enjoy playing the game but considering quitting because of the hassle it take to get it to run every time I wanna play.
     
    • Pathoschild

      Pathoschild Tiy's Beard

      hi @Tsham. There are a few things that can cause this. Let's start with the easier fixes:
      1. Does it still happen after rebooting your computer?
      2. Does it still happen after resetting your game files?
      3. Do you have an antivirus or security suite? If so, does it still happen if you temporarily disable it?
       
      • Tsham

        Tsham Space Hobo

        Yes I have tried all of those multiple times, not luck.
         
        • Pathoschild

          Pathoschild Tiy's Beard

          Does the error happen if you run the game as administrator? (That isn't a permanent fix, just a test.)
           
          • Tsham

            Tsham Space Hobo

            yes I have tried that, and yes same error.
             
            • Pathoschild

              Pathoschild Tiy's Beard

              @Tsham Which version of Windows you have?
               
              • Tsham

                Tsham Space Hobo

                I use Windows 7 ultimate.
                 
                • Pathoschild

                  Pathoschild Tiy's Beard

                  Next things to try:
                  Does it still happen after all that?
                   
                  • Tsham

                    Tsham Space Hobo

                    I can get it to work after repairing 4.0. But when I install 4.5, 4.0 is no longer in my programs list and it stops working again.
                     
                    • Pathoschild

                      Pathoschild Tiy's Beard

                      Does it make any difference if you repair .NET Framework 4.0 again after installing .NET Framework 4.5?
                       
                      • Tsham

                        Tsham Space Hobo

                        It tells me that a newer version is installed and doesn't let me repair.
                         
                        • Pathoschild

                          Pathoschild Tiy's Beard

                          It seems that .NET Framework 4.5 is broken on your PC for some reason. (A clean install of Windows would probably fix that.) If the game works with only .NET Framework 4.0 installed, I guess you can do that?
                           

                          Share This Page