Content Importers keep breaking

I’ve been having issues with my content project constantly losing an importer. Specifically the SpriterDotNet importer developed for Spriter integration in MonoGame. It was working fine on Sunday, I load up the project today and I’ve just spent the last 2 hours trying to get it working again. This is the 3rd of 4th time I’ve had this issue.

I have no idea what the issue is, or why it keeps happening (Windows update related?) all I know is I’m losing a lot of precious dev time to trying to solve this same issue over and over. I’m downloading the dlls using the nuget package manager, but also have local build of the dll that I’ve tried too. No matter what way round I try and put these DLLs it still says ‘invalid importer’ and fails to build the spriter importers. I even have the DLLs from when it was working because I sent them as a zip to another dev on the project with the same issues.
I’ve also tried reinstalling 3.6, and 3.7 including changing the associated nuget packages. I don’t know if there’s any kind of conflict going on there.

Any help or advice resolving this issue is greatly appreciated because I’m at my wits end trying to get this to work and stay working.

What Windows Edition?

Windows 10 (home, I think).
I’m using vs2017 community too.

I don’t know if things have changed because I use a rather old Content Pipeline modified to my needs, but the references are stored in the Content.mgcb file.

This won’t fix, but will speed up recovery:

If you edit that (working) .MGCB file with a text editor you will see a line starting with /reference: almost at the start of the file.

What I’d do is, once you have a working MGCB file, copy the /reference line and the contents of the folder containing the DLL into a safe place. Each time it fails again, restore the folder and restore the /reference line.

To find a more permanent solution, I first I’d try to pinpoint the source of the problem, if /reference disappears, or DLL change. To do so, next time it fails, check the MGCB file:

If /reference disappears, it could be a malfunction of the pipeline program, or maybe a you’re using an automatic generator to create/modify the MGCB file which is skipping the /reference line.

If DLL changes (use a MD5 on all DLLs when you get back a working environment) or disappear, the culprit may be nuget, or even a virus (or worse, the antivirus XD)

The worst thing is that it was working, and I didn’t change anything from shutting down my computer on Sunday to starting it up again on Tuesday, yet the importers are being classed as invalid now (Cannot build Spriter importer or some such error message, which means it knows about the importer, just can’t create it). So there was no change to the .MGCB file which is still referencing the local Lib folder I created in content to keep all the importers together and away from any nasty nuget changes.
I’m trying to pinpoint the source of the problem just now. Before, through continued effort and persistence, I managed to get things working again after moving back to master on my git, everything just worked again, but discarding all of my changes doesn’t fix the issue again. It just seems so entirely random that they’ll work for days, then break, which is why I assume it may have been a Windows update issue but I don’t even know how I’d begin to investigate that.

Tonight I’m going to pull the SpriterDotNet projects into a new, clean solution built with MonoGame 3.7 and see if I can get it working again that way to help diagnose the issue.

Wish me luck.

Check your action centre for a content block message from defender…

Thanks for the suggestions. I’m still no further forward. I’ve tried an update of VS2017 to see if that works.

I’m starting to suspect the issue isn’t with MonoGame but the SpriterDotNet Importer itself. I cloned the repo (https://github.com/loodakrawa/SpriterDotNet) and while it builds, it still states in the content project that the scml files have an unknown importer, though correctly knows they use the pass through processor (No Processing Required). The XNB is correctly generated too with the initial header “XNBd »Á SpriterDotNet.MonoGame.Content.SpriterTypeReader, SpriterDotNet.MonoGame, Version=1.6.1.0, Culture=neutral, PublicKeyToken=null §‚<?xml version="1.0" encoding="UTF-8"?>
<spriter_data scml_version=“1.0” generator=“BrashMonkey Spriter” generator_version=“b5.95”>” followed by the xml files.

The project builds all the content and runs without issue. I may have better luck asking the maker of the importer.