R
R
Roman Koff2021-07-15 14:55:53
C++ / C#
Roman Koff, 2021-07-15 14:55:53

Is it possible to compile classes at runtime compilation in an ASP.NET CORE(5) project?

Previously, when using ASP/NET MVC projects, it was possible to add a class file to the App_Code folder and make it available to Razor views. Thus, for example, it was possible to add data model classes directly on the site.

Is there similar functionality in ASP.NET CORE? How to add a new class to an existing site without recompiling the sources?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vasily Bannikov, 2021-07-15
@Zarinov

There is a dotnet watch that will automatically restart the application when the code changes
In .NET 6 there is a full-fledged (almost) Hot reload
UPD: there is a RuntimeCompilation package:
https://docs.microsoft.com/en-us/aspnet/core/mvc/v ...
Just it is possible to add new representations in runtime, or to change existing.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question