Software⏱️ 2 min read📅 2026-05-31

How to Fix: Package.resolved file is corrupted or malformed

Resolve corrupted Package.resolved file to add packages to a project.

Quick Answer: Try deleting the .suo file (not .resolved) and then re-add each package to the project. If issue persists, try cleaning and rebuilding the solution.

The 'Package.resolved file is corrupted or malformed' error can be frustrating, especially when it's preventing you from adding packages to your project. In this article, we'll explore the root causes of this issue and provide a step-by-step guide on how to resolve it.

🛑 Root Causes of the Error

  • Corrupted or malformed Package.resolved file due to a previous failed installation attempt.
  • Package conflicts or dependencies issues.
  • Incompatible package versions.

🚀 How to Resolve This Issue

Method 1: Re-run the Package installation

  1. Step 1: Delete the Package.resolved file manually and let Xcode regenerate it.
  2. Step 2: Open your project in Xcode, go to Product > Clean Build Folder, and then try adding the package again.

Method 2: Resolve Package conflicts

  1. Step 1: Open the Package.resolved file in a text editor and remove any lines that start with 'ERROR'.
  2. Step 2: Review the package conflicts and update or delete the conflicting packages.

🎯 Final Words

By following these steps, you should be able to resolve the 'Package.resolved file is corrupted or malformed' error and successfully add packages to your project. Remember to always keep your Package.resolved file up-to-date and clean to avoid any future issues.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions