Strange unity error, unable to open my project <omg everythings broken!!>

So, this happened after I shut my laptop with Unity running. When I reopened it, the Unity window was black (like there was a render bug). I hit the ‘x’ to close and it asked me if I wanted to save, and I did because I had just tested it before I closed the laptop and everything ran fine. Which apparently was a mistake.

Now, whenever I open the project I get:

Fatal error!
detected multiple library folders within your project"
Did you copy a project into this project? Use “Export Package” to move assets between projects.
You need to remove the following Library folder(s) from your project before you can open it again:
c:/users/mymachine/documents/myproject/assets/library

And it looks like indeed there is a Library folder in my assets folder AND a project called “c:/users/mymachine/documents/myproject/assets/”

When I delete the library folder and open my project every single one of my scripts cannot be loaded. Like, mono behavior is missing. Then when I open the (correct) project – not the one apparently living in assets – it recreates the library that I deleted

Any ideas on how to untangle this without losing all my work?

Been trying to rebuild the project, and have a more specific question:

When I attach a script to a game object, where is this association saved exactly?

Im not sure if its saved somewhere you can find it. I accadentily deleted some of my scripts once, and i had to drag them out of the trash and back into unity and then onto the gameobject.

I do hope you made a backup before the deleting of folders. I had a similar problem. Getting rid of the library folder did not help, which is why I cut it instead of deleting it so I could paste it back in when it didn’t work. I believe I fixed my issue. Apparently there were TWO library folders and TWO project settings folders/files. Based on how I named additional folders (Assets, Prefabs, Scripts) within a folder that I named after myself, Unity thought that the folder they were being held in was a secondary project and so automatically added in a secondary project settings and library folder. After getting rid of the secondary library/project settings folder/files, I renamed the secondary assets/prefabs/ and script folders that I had made. It appears to have worked for me and I hope it helps anyone else who is reading this.