Results 1 to 5 of 5

Thread: Why is OneDrive Deleting My Project Files Causing Error System.InvalidOperationExcept

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2022
    Posts
    1

    Question Why is OneDrive Deleting My Project Files Causing Error System.InvalidOperationExcept

    t seems as though OneDrive somehow kept deleting my files from my project (that I REALLY NEED!) & now my project keeps throwing errors saying that This all happens when I go to run the program in DEBUG. I have missing files as shown in the image below:

    Code:
    System.InvalidOperationException
      HResult=0x80131509
      Message=An error occurred creating the form. See Exception.InnerException for details.  The error is: Could not load file or assembly 'MySql.Data, Version=8.0.30.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The system cannot find the file specified.
      Source=eBayKeywordSniperPro
      StackTrace:
       at eBayKeywordSniperPro.My.MyProject.MyForms.Create__Instance__[T](T Instance)
       at eBayKeywordSniperPro.My.MyProject.MyForms.get_FormSelector()
       at eBayKeywordSniperPro.My.MyApplication.OnCreateMainForm()
       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
       at eBayKeywordSniperPro.My.MyApplication.Main(String[] Args)
    
    Inner Exception 1:
    FileNotFoundException: Could not load file or assembly 'MySql.Data, Version=8.0.30.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The system cannot find the file specified.

    I have disconnected OneDrive because I feel like they are stealing my data/files and then charging me for additional storage. If I didn't pay Microsoft, then they won't allow me to retrieve the data. That's shady.

    Anyhow, I don't see any options to use the "Nuget Installation" to download the dependencies or necessary files that the project needs to run.

    How do I make sure that the files remain in the proper folders after disconnecting from Microsoft's OneDrive? Thanks.

  2. #2
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    38,988

    Re: Why is OneDrive Deleting My Project Files Causing Error System.InvalidOperationEx

    I've never heard of that before, but if files were being removed, that's a strangely specific file. Therefore, I suspect that something else is going on.

    I assume that you are using a MySQL database. Is this framework, or Core (which includes .NET 5/6)? How did you add the MySql.data originally?
    My usual boring signature: Nothing

  3. #3
    PowerPoster yereverluvinuncleber's Avatar
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    2,235

    Re: Why is OneDrive Deleting My Project Files Causing Error System.InvalidOperationEx

    Not a specific answer to your problem but I'd suggest your suspicion of Microsoft is not unwarranted. I am sure they are not actually stealing anything but they are well known for fecking up their tools that use synchronisation to achieve remote storage. The old briefcase utility was known for having sync. errors that might lose data and recently oneDrive was a major culprit in deleting a lot of user's data from the user's local systems. Onedrive is now removed from any PC that comes into my possession.

    The Windows 'desktop' (my documents &c) is known for having some bugs that have in the past lost many a user's files causing them to remain as zero-size links pointing to nothing at all. Happened to me on separate systems twice in 10 years. I no longer store any of my data in a Microsoft designed structure such as "my rubbish". I do however, have faith in NTFS and I store everything on the data drive well away from "my documents" or any other MS imposed structure.

    If you've used Outlook extensively over the years you'll be familiar with Outlook's failure to synch emails when the outlook OST/PST files grew beyond 1gb in size potentially causing catastrophic loss of your emails.

    Bottom line is: Don't trust Microsoft synching utilities to store your data.
    https://github.com/yereverluvinunclebert

    Skillset: VMS,DOS,Windows Sysadmin from 1985, fault-tolerance, VaxCluster, Alpha,Sparc. DCL,QB,VBDOS- VB6,.NET, PHP,NODE.JS, Graphic Design, Project Manager, CMS, Quad Electronics. classic cars & m'bikes. Artist in water & oils. Historian.

    By the power invested in me, all the threads I start are battle free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.

  4. #4
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,532

    Re: Why is OneDrive Deleting My Project Files Causing Error System.InvalidOperationEx

    Why are you using OneDrive in the first place? Use GitHub... not only can you work on the files anywhere (by grabbing a clone of your repo), but you also gain the benefit of source control.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  5. #5
    Fanatic Member
    Join Date
    Jun 2019
    Posts
    557

    Re: Why is OneDrive Deleting My Project Files Causing Error System.InvalidOperationEx

    Someone else reported similar problem here (in this forum) in the past about using OneDrive or something similar to "backup" sources and there were some losses. I don't remember the details, but in general using such apps for backup purposes of source code is just wrong. Or at least put source directory to be handled by these file sync apps. Just don't do that.

    Use the proper tools - Git for keep track of changes and centralized store for Git repositories like GitHub where your local repository is pushed to and kept on remote server.

    You can make own backups - like ZIP file of your sources and do it each night. You can put these archives in separate directory which are handled by file sync apps like OneDrive.

    File sync seems easy. Put folder here, add to file sync app. Do same with your photos from your phone camera. Do this on multiple devices and watch the fun when several devices create or modify same directory and then try to get "in sync". These sync tools are pretty smart as they exist for many years and conflicts are solved almost automatically.

    But sometimes algorithms don't support all cases. Or at least not as users expected. Or maybe users don't know some details how to setup the sync options.

    It is the same with source control - users of such systems should know at least the basics how to use them and do it properly.

    My advice is to learn about Git if you never used it, how to use the basic features from Visual Studio as it has built-in support for Git. Then check GitHub, register and try with some test projects how to use it. Only to mention: use VS for everything, don't upload files manually to GitHub from the web UI. VS will intialize properly the repository with correct .gitignore file and you can commit changes to files locally, then push (upload) changes to the remote GitHub server with just few clicks inside the VS IDE.

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