5 Answers, 1 is accepted
Hello Bruce,
I have performed some local tests, but the described issue was not replicated - the Core 3.0 referenced are correctly applied in the respective Project Template. Could you please share a bit more about the steps for replication. What is the exact type of project that you've created and with which Visual Studio (2019 or 2019 Preview). Also, which version is your Visual Studio and what is the SDK that you have installed at your end?
Regards,
Nencho
Progress Telerik

Hi Nencho,
Visual Studio 16.3.1 | Telerik ASP.NET Core 2019.3.917
See attached images of how the code looks after creating a project from a Telerik template. How do I get a new template that uses the preferred syntax for ASP.NET Core 3 MVC projects i.e. AddControllersWithViews and IHostbuilder instead of the 2.2 sytax of AddMvc and IWebHostBuilder?
Hello Bruce,
Thank you very much for the screenshots and feedback provided. Indeed the official Core 3.0 was released couple of days after our official release, which is why we target such enhancements for the upcoming Service pack, scheduled for the end of the month (October). The IHostBuilder will definitely be included in the template, however, it seems like the AddControllersWithViews is not suitable for Pages scenario (source). Could you please share your point of view and the necessity to have it in a new project?
Regards,
Nencho
Progress Telerik

Thanks for the reply Nencho.
I believe the 3.0 documentation states that for Pages Scenario you just use:
public void ConfigureServices(IServiceCollection services)
{
services.AddRazorPages();
}
https://docs.microsoft.com/en-us/aspnet/core/migration/22-to-30?view=aspnetcore-3.0&tabs=visual-studio
As stated in the first post - the older way works but it seems strange that the newer templates are not adopting the new syntax, which might be deprecated before its time.
Hello Bruce,
I have revised again the implementation of the templates, and indeed, we can have the AddRazorPages usage only on the RazorPages template, while the AddControllersWithViews will be applied to all other Templates. The changes will be released with the upcoming Service Pack.
Thank you for your valuable feedback. I have updated your Telerik Points on the matter.
Regards,
Nencho
Progress Telerik