{
  "id": "unity/il2cpp-error-marshal-directorynotfound",
  "signature": "IL2CPP error: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\\Build\\Temp\\StagingArea\\Data\\Managed\\System.dll'",
  "signature_zh": "IL2CPP 错误：System.IO.DirectoryNotFoundException：找不到路径 'C:\\Build\\Temp\\StagingArea\\Data\\Managed\\System.dll' 的一部分",
  "regex": "IL2CPP error: System\\.IO\\.DirectoryNotFoundException: Could not find a part of the path '.+\\\\Data\\\\Managed\\\\System\\.dll'",
  "domain": "unity",
  "category": "build_error",
  "subcategory": null,
  "root_cause": "The IL2CPP build process cannot find a required managed assembly (e.g., System.dll) in the staging area, often due to incomplete build cache or missing .NET backend files.",
  "root_cause_type": "generic",
  "root_cause_zh": "IL2CPP 构建过程在暂存区找不到所需的托管程序集（例如 System.dll），通常是由于构建缓存不完整或缺少 .NET 后端文件。",
  "versions": [
    {
      "version": "Unity 2022.3.30f1",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Unity 2023.2.5f1",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Unity 6000.0.0a20",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "The issue is a corrupted build cache, not missing Unity components.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "The staging area is regenerated each build; manual copies are overwritten or cause version mismatches.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "This avoids the error but changes the runtime behavior and may not be acceptable for platforms requiring IL2CPP (e.g., iOS, WebGL).",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Delete the 'Library' and 'Temp' folders in the project directory, then rebuild from scratch. This clears the corrupted build cache.",
      "success_rate": 0.8,
      "how": "Delete the 'Library' and 'Temp' folders in the project directory, then rebuild from scratch. This clears the corrupted build cache.",
      "condition": "",
      "sources": []
    },
    {
      "action": "In Project Settings > Player > Configuration, set 'Scripting Backend' to 'IL2CPP' and 'Api Compatibility Level' to '.NET Standard 2.1' (or '.NET Framework' if available). Then perform a clean build via Build Settings > Clean Build.",
      "success_rate": 0.7,
      "how": "In Project Settings > Player > Configuration, set 'Scripting Backend' to 'IL2CPP' and 'Api Compatibility Level' to '.NET Standard 2.1' (or '.NET Framework' if available). Then perform a clean build via Build Settings > Clean Build.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Delete the 'Library' and 'Temp' folders in the project directory, then rebuild from scratch. This clears the corrupted build cache.",
    "In Project Settings > Player > Configuration, set 'Scripting Backend' to 'IL2CPP' and 'Api Compatibility Level' to '.NET Standard 2.1' (or '.NET Framework' if available). Then perform a clean build via Build Settings > Clean Build."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://docs.unity3d.com/Manual/IL2CPP.html",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.86,
  "fix_success_rate": 0.75,
  "resolvable": "partial",
  "first_seen": "2024-05-02",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}