Results 1 to 8 of 8

Thread: vb.net System.InvalidOperationException

  1. #1

    Thread Starter
    Member ilya20's Avatar
    Join Date
    Nov 2017
    Posts
    55

    vb.net System.InvalidOperationException

    hi dears
    A little while ago suddenly, Software encountered an error
    Of course, this problem occurred when I deleted the Windows tmp folder

    this code exception detail error
    Code:
    System.InvalidOperationException was unhandled
      Message=An error occurred creating the form. See Exception.InnerException for details.  The error is: The system cannot find the file specified
      Source=Gsd Android Tool
      StackTrace:
           at Gsd_Android_Tool.My.MyProject.MyForms.Create__Instance__[T](T Instance) in :line 197
           at Gsd_Android_Tool.My.MyProject.MyForms.get_Home()
           at Gsd_Android_Tool.My.MyApplication.OnCreateMainForm() in D:\my devrloping\tools src\Gsd Android Tool\Gsd Android Tool\Gsd Android Tool\My Project\Application.Designer.vb:line 35
           at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
           at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
           at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
           at Gsd_Android_Tool.My.MyApplication.Main(String[] Args) in :line 81
           at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
           at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
           at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
           at System.Threading.ThreadHelper.ThreadStart()
      InnerException: 
           ErrorCode=-2147467259
           Message=The system cannot find the file specified
           NativeErrorCode=2
           Source=System
           StackTrace:
                at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
                at RegawMOD.Command.HandleOutput(Process p, AutoResetEvent outputWaitHandle, AutoResetEvent errorWaitHandle, Int32 timeout, Boolean forceRegular)
                at RegawMOD.Command.RunProcessReturnOutput(String executable, String arguments, Int32 timeout)
                at RegawMOD.Android.Fastboot.ExecuteFastbootCommand(FastbootCommand command)
                at Gsd_Android_Tool.Home..ctor() in D:\my devrloping\tools src\Gsd Android Tool\Gsd Android Tool\Gsd Android Tool\Form1.vb:line 15
           InnerException:
    How can I fix this problem?

  2. #2
    Wall Poster TysonLPrice's Avatar
    Join Date
    Sep 2002
    Location
    Columbus, Ohio
    Posts
    3,834

    Re: vb.net System.InvalidOperationException

    Do you have a question other than the file is not found?
    Please remember next time...elections matter!

  3. #3

    Thread Starter
    Member ilya20's Avatar
    Join Date
    Nov 2017
    Posts
    55

    Re: vb.net System.InvalidOperationException

    Quote Originally Posted by TysonLPrice View Post
    Do you have a question other than the file is not found?
    no sir
    During software debugging, the system.InvalidOperationException error occurs

  4. #4
    Wall Poster TysonLPrice's Avatar
    Join Date
    Sep 2002
    Location
    Columbus, Ohio
    Posts
    3,834

    Re: vb.net System.InvalidOperationException

    OH...I thought you meant you didn't understand the error. Can you restore back from the recycle bin?
    Please remember next time...elections matter!

  5. #5

    Thread Starter
    Member ilya20's Avatar
    Join Date
    Nov 2017
    Posts
    55

    Re: vb.net System.InvalidOperationException

    Quote Originally Posted by TysonLPrice View Post
    OH...I thought you meant you didn't understand the error. Can you restore back from the recycle bin?
    I have all the files shift+ delete
    I used the DotNetBar template. In the software, after deleting the tmp folder, all the templates were cleared from Visual Studio.
    I installed DevComponents.DotNetBar again and added the software templates to Visual Studio.But the software again fails
    it's interesting
    I run the source on my Windows 7 laptop
    Run without any problems , But it does not work on my windows

  6. #6

    Thread Starter
    Member ilya20's Avatar
    Join Date
    Nov 2017
    Posts
    55

    Re: vb.net System.InvalidOperationException

    ohhhhh an interesting thing
    I copied the Temp folder from Windows 7 to my computer temp
    And the problem was solved

  7. #7
    You don't want to know.
    Join Date
    Aug 2010
    Posts
    4,578

    Re: vb.net System.InvalidOperationException

    In Form1.vb, line 15, you try to do something that wants to open a file. The stack trace makes me suspicious you're trying to start another process.

    So it's likely you deleted the other process, and your program isn't set up to handle that. You should consider finding a way to gracefully handle this error.
    This answer is wrong. You should be using TableAdapter and Dictionaries instead.

  8. #8
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    8,598

    Re: vb.net System.InvalidOperationException

    The constructor for the Gsd_Android_Tool.Home object is trying to open a process which it cannot find because the file is missing, presumable an executable file.

    A Gsd_Android_Tool.Home object is being instantiated somewhere before your main form loads, or it may be in form load itself as you can see by the call to Create__Instance being at the top of the stack trace. I can't really remember but I think Create__Instance is called just before the Form's Load event is raised in which case it, it can be tricky to debug since it means that the code in breaking somewhere in the .Net Framework itself.

    Your best bet is to simply find out what file it's looking for and deal with it from there as Sitten suggested. Find out why this file is not where it's supposed to be and see if you can work your way around that.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width