Coding⏱️ 2 min read📅 2026-06-03

How to Fix: Publish error: Found multiple publish output files with the same relative path

Resolve conflict by specifying unique output paths for each project.

Quick Answer: Specify unique output paths in the publish settings to resolve the conflict.

The error 'Found multiple publish output files with the same relative path' occurs when the compilerconfig.json or package.json files in your ASP.NET Core project have the same relative paths. This can happen if you're using a theme library that doesn't handle this situation correctly.

🛑 Root Causes of the Error

  • Using a theme library that doesn't handle duplicate relative paths.

🛠️ Step-by-Step Verified Fixes

Method 1: Exclude Duplicate Files from Publish Output

  1. Step 1: Open the launchSettings.json file in your project.

Method 2: Use a Custom Publish Configuration

  1. Step 1: Create a new file called publishsettings.json in the root of your project.

🎯 Final Words

To resolve this issue, you can exclude duplicate files from the publish output or use a custom publish configuration. By following these steps, you should be able to fix the error and successfully publish your ASP.NET Core project.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions