This post shows you How to solve conflict detected for Microsoft.AspNetCore.Razor.Language in ASP.NET Core.

Severity Code Description Project File Line Suppression State

Error NU1107 Version conflict detected for Microsoft.AspNetCore.Razor.Language. Install/reference Microsoft.AspNetCore.Razor.Language 3.0.0 directly to project 'Your project name' to resolve this issue. 

 'Your project name' -> Microsoft.VisualStudio.Web.CodeGeneration 3.0.0 -> Microsoft.VisualStudio.Web.CodeGeneration.EntityFrameworkCore 3.0.0 -> Microsoft.VisualStudio.Web.CodeGeneration.Core 3.0.0 -> Microsoft.VisualStudio.Web.CodeGeneration.Templating 3.0.0 -> Microsoft.AspNetCore.Razor.Language (>= 3.0.0) 

 'Your project name' -> Microsoft.AspNetCore.App 2.2.0 -> Microsoft.AspNetCore.Razor.Language (>= 2.2.0 && < 2.3.0)

Right click on your project, then select Properties.

Next, you need to select Application tab, then change your target framework to new version.

After changing your target framework, You need to right click on your project, then select Manage Nuget Packages from the Visual Studio.

Next, Search Microsoft.AspNetCore.Razor.Language, then install it

Finally, Rebuild your project.