Software⏱️ 2 min read📅 2026-06-03
How to Fix: Build error: You must add a reference to System.Runtime
Resolve System.Runtime assembly reference issue in ASP.NET MVC 5.1 solution.
Quick Answer: Add the missing System.Runtime NuGet package to your project's dependencies.
📋 Table of Contents
[2 paragraphs intro]
🛑 Root Causes of the Error
- When you create a Portable Class Library (PCL) project, it's possible for the compiler to not include all the necessary references by default. In this case, the error is caused by missing references to System.Runtime.
🚀 How to Resolve This Issue
Method 1: Adding a Reference Manually
- Step 1: Open the solution in Visual Studio and go to the 'References' section of your PCL project.
Method 2: Using NuGet Package Manager
- Step 1: Open the NuGet Package Manager in Visual Studio and search for 'System.Runtime'
✨ Wrapping Up
By following these steps, you should be able to resolve the error and successfully build your ASP.NET MVC 5.1 solution.
❓ Frequently Asked Questions
When you create a Portable Class Library (PCL) project, it's possible for the compiler to not include all the necessary references by default. In this case, the error is caused by missing references to System.Runtime.
Step 1: Open the solution in Visual Studio and go to the 'References' section of your PCL project.
Step 1: Open the NuGet Package Manager in Visual Studio and search for 'System.Runtime'
By following these steps, you should be able to resolve the error and successfully build your ASP.NET MVC 5.1 solution.
🛠️ Related Fixes
How to Fix: Pc crashes shortly after launching game (rainbow
Fix Pc crashes shortly after launching game (rainbow six siege). Compl
How to Fix: Installing an APK on a locked down phone
Installing an APK on a locked down phone: Try using a rooted device, e
How to Fix: New PC build- no signal and no clue
Fix New PC build- no signal and no clue. Complete troubleshooting guid