From cbeab760234b3a227adcf964e882d501d7f3e2fc Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 29 Jul 2025 21:04:29 +0000 Subject: [PATCH 1/2] Initial plan From d06b9b57dd716d8e7d4f1dfa6e103e1a11c6a558 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 29 Jul 2025 21:09:37 +0000 Subject: [PATCH 2/2] Add obj/bin deletion solution to CS0518 documentation Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com> --- docs/csharp/language-reference/compiler-messages/cs0518.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/csharp/language-reference/compiler-messages/cs0518.md b/docs/csharp/language-reference/compiler-messages/cs0518.md index 4e39b1afd5a50..1338940407da2 100644 --- a/docs/csharp/language-reference/compiler-messages/cs0518.md +++ b/docs/csharp/language-reference/compiler-messages/cs0518.md @@ -30,6 +30,8 @@ The main cause for this problem is that the project is not importing mscorlib.dl - Make sure that the project refers to the correct mscorlib.dll. +- Close Visual Studio, delete the `obj` and `bin` folders from your project directory, then reopen Visual Studio and rebuild the project. + - Reinstall the .NET Framework common language runtime (if the previous solutions do not solve the problem). Optionally