dotnet / dotnet/aspnetcore

ASP.NET MVC does not work on dotnet sdk 7.0.304+

Open
#49,320 1 comment 0 reactions 0 assignees View on GitHub
area-mvc
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 10h
Merged PRs (30d)
281

Description

### Is there an existing issue for this?

- [X] I have searched the existing issues

### Describe the bug

MVC project failure on dotnet sdk 7.0.304 or dotnet sdk 7.0.305

MVC application fails after start with message:
An unhandled exception occurred while processing the request.
InvalidOperationException: The view 'Index' was not found. The following locations were searched:
/Views/Home/Index.cshtml
/Views/Shared/Index.cshtml
Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult.EnsureSuccessful(IEnumerable originalLocations)

### Expected Behavior

Application starts correctly

### Steps To Reproduce

1. Install dotnet sdk 7.0.304
2. Run Visual Studio (I use Microsoft Visual Studio Community 2022 (64-bit) - Current Version 17.4.5)
3. Create new project ASP.NET Core Web App (Model-View-Controller). Use framework .net 6 or 7.
4. Run the solution

### Exceptions (if any)

_No response_

### .NET Version

7.0.304 or 7.0.305

### Anything else?

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.