Xna reference problems..

I have been moving files around to organize my disk…

MonoGame projects launched from new locations wont run!

-There are no listed bugs untill run, then when I run, theres a thousand issues because it doesnt know what vector2s are…

It cannot find microsoft.xna…

I can still run from old locations… But I would like the freedom to move my projects around, so I can disconnect my old disk…

Any good ideas out there?

This is why I don’t use the installer, or nuget packages, or any of that garbage. It always goes wrong for people, without fail. I keep the actual MonoGame.dll in my project’s folder and use a batch script to call csc.exe directly and use the MonoGame DLL as a reference in the compiler flags. It cannot go wrong. I don’t have a clue why people mess around with IDEs and putting things in weird directories unrelated to their projects, it’s a catastrophe waiting to happen.

@kameko, that may work for you, and that’s good if it fits your development style. It is not the normal development process however, and not one I would recommend to new users.

@monopalle, did you get MonoGame from the installer, Nuget or build from source? You don’t mention which directories you moved, so we can only take guesses here.

The installer puts the MonoGame assemblies into your Program Files directory. Moving anything around in there or moving Program Files itself is a recipe for disaster, not just for MonoGame but your Windows installation in general.

Nuget puts the assemblies into your project directory structure, so as long as you kept the project directory together, that should be OK.

If you build from source, you may need to update the project or assembly reference in your project if you moved the MonoGame source directory to a different location.

The number of issues I’ve seen arise from moving directories around, and this happens to new users and experienced developers, confirms the old adage, “if it ain’t broke, don’t fix it.”

Hi, and thank you, but all that went way over my head…

I dont know anything about DLLs or nuget packages or compiler flags… I have just installed the free microsoft editor, then installed monogame, then written code…

I’m pretty sure I am just using whatever default settings might apply.

Thank you.

I used the installer.

The reason I’m messing with the programs folder is that I have replaced my old hard-disk, and done a clean install on SSD. Now I have reconnected my old disk to transfer things I want to keep…
I had no idea there would be such a fuss copying files from an old disk. I was banking on drag-and-drop…

Is Nuget something I can just go use, or is it like a whole skill set? Can I just create a NEW project, and then copy all my classes and assets into it…? I could copy/paste all the code, but i would be cool if I could just copy the saved .cs files.

SSDs I have used have come with a hard-disk transfer utility. Copying parts of Program Files across manually will never work. Applications set many things during installation, including registry keys and many other bits that don’t exist in the Program Files directory structure. If you didn’t use the hard-disk transfer utility, you should re-install your applications, including Visual Studio followed by MonoGame.

Not exactly true, using links makes it actually work (but it needs to be done with the windows install disk in repair mode).
I save a lot of free space on my SSD doing it, I used to use Junction Link Magic tool to achieve it, despite now since win7 links are (more or less) supported.

So you guys are saying I need 3rd party tools to copy files from my old hard disk? I dont understand. That sounds like something from the windows 95 days… I mean, I can use a mouse in BIOS these days… I thought we were beyond this:-)

Oh well…
Sounds like it would be easier to just copy/paste my code to a new project… -And just save a new copy…
What a stupid work-around to have to do… Lessons learned…