NickeManarin/ScreenToGif · error · Exception

Project not compatible with this version

Error message

Project not compatible with this version

What it means

ImportFromProject extracts a project .zip and looks for Project.json (the modern project manifest). If Project.json is absent but the legacy List.sb exists, it throws — the project was saved by an older ScreenToGif version that used binary serialization and is no longer loadable by this build.

Source

Thrown at ScreenToGif/Windows/Editor.xaml.cs:4113

                List<FrameInfo> list;

                if (File.Exists(Path.Combine(pathTemp, "Project.json")))
                {
                    //Read as text.
                    var json = File.ReadAllText(Path.Combine(pathTemp, "Project.json"));

                    using (var ms = new MemoryStream(Encoding.UTF8.GetBytes(json)))
                    {
                        var ser = new DataContractJsonSerializer(typeof(ProjectInfo));
                        var project = ser.ReadObject(ms) as ProjectInfo;

                        list = project?.Frames;
                    }
                }
                else
                {
                    if (File.Exists(Path.Combine(pathTemp, "List.sb")))
                        throw new Exception("Project not compatible with this version");

                    throw new FileNotFoundException("Impossible to open project.", "List.sb");
                }

                //Shows the ProgressBar
                ShowProgress(LocalizationHelper.Get("S.Editor.ImportingFrames"), list?.Count ?? 0);

                var count = 0;
                foreach (var frame in list ?? [])
                {
                    //Change the file path to the current one.
                    frame.Path = Path.Combine(pathTemp, Path.GetFileName(frame.Path));

                    count++;
                    UpdateProgress(count);
                }

                return list;

View on GitHub (pinned to a4d0a67c21)

Solutions

  1. Install an older ScreenToGif version that supports List.sb, open and re-save the project so it serializes to Project.json.
  2. If you control the source, re-export the project from the original recording.
  3. Communicate to the user that legacy projects must be re-saved by a transitional build.
  4. Add a one-time migration path: detect List.sb and deserialize via the legacy BinaryFormatter before throwing.

Example fix

// before
if (File.Exists(Path.Combine(pathTemp, "List.sb")))
    throw new Exception("Project not compatible with this version");

// after
if (File.Exists(Path.Combine(pathTemp, "List.sb")))
    throw new Exception("Project not compatible with this version. It uses the legacy List.sb format. Open it in an older ScreenToGif build and re-save to convert to Project.json.");
Defensive patterns

Strategy: validation

Validate before calling

// Inspect the extracted folder before deserializing
bool hasModern = File.Exists(Path.Combine(pathTemp, "Project.json"));
bool hasLegacy = File.Exists(Path.Combine(pathTemp, "List.sb"));
if (!hasModern && hasLegacy) /* warn: legacy project — must be re-saved by older build */

Type guard

static ProjectFormat DetectProjectFormat(string pathTemp) =>
    File.Exists(Path.Combine(pathTemp, "Project.json")) ? ProjectFormat.Modern :
    File.Exists(Path.Combine(pathTemp, "List.sb"))     ? ProjectFormat.Legacy  :
    ProjectFormat.Unknown;

Try / catch

try { return ImportFromProject(source, pathTemp); }
catch (Exception ex) when (ex.Message.Contains("not compatible"))
{ /* inform user the project is from an older ScreenToGif version */ }

Prevention

When it happens

Trigger: Opening a .stg/project archive whose contents include List.sb but not Project.json.

Common situations: User opens a project saved by ScreenToGif ≈ pre-2019 builds; project migrated from an old backup; project from a fork that still emits List.sb.

Related errors


AI-assisted analysis of NickeManarin/ScreenToGif@a4d0a67c21 (2026-08-13). Data as JSON: /api/errors/a766d0cfcf893a64. Report an issue: GitHub.