Visual Studio 2019 C# Source Not Available Error

Javaid 1 Reputation point
2021-02-25T09:32:37.857+00:00

Hi, I have visual studio 2019. This week I moved up a version to 16.8.6 from 16.4 as per Microsoft recommendation. I am using MVC framework. I return a view based on a condition as follows. if condition A return View "A" else condition B return View "B" else return View "C" Application runs successfully for showing views A. But for view B it says source not available. I have check my windows directory for my solution, and View B is there, name is correct, spelling is correct yet I just cannot seem to launch View B. I have also tried cleaning the solution and rebuild, removed debug setting 'require source file to exactly match oriinal version' but nothing seems to be working. Your help is appreciated.

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,643 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,308 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Duane Arnold 3,216 Reputation points
    2021-02-25T13:02:34.683+00:00

    Are you taking about using the MVC UI design pattern for a Windows form solution?

    Where is this decision making process happening as to what view to show?