# Fix Error - InvalidOperationException: The view 'Index' was not found. The following locations were searched:
/Views/StartPage/Index.cshtml

## Issue

If you install a fresh instance of CMS 12 and if you build a solution with Visual Studio, the site breaks with *The view 'Index' was not found* error. It appears like the below screenshot.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1696614319706/1f44de1e-9d96-484b-ae95-2455492e4b5a.png align="center")

## Fix

* Delete your /bin and /obj folder
    
* Now instead of building a solution from Visual Studio, Open the console OR terminal at the root of the Website and run `dotnet run`
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1696614762315/ff86f886-4a4c-470c-8f21-e8685aaf9512.png align="center")
    
* The above command will compile your code cleanly without the above issue
    
* I don't know what Visual Studio "Build Solution" vs "dotnet run" does differently which causes this, but this fixes the issue if anyone is looking to resolve it.
