Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
View Pre-compilation: Remove the need for special settings #137
As per #105 view pre-compilation is supported with a couple of config settings, but it may be possible to reduce the friction here.
Firstly we may be able to use the same magic that the MvcPrecompilation project uses to create a page template and block type metadata file at build time that we can rely on to always be there no matter what pre-compilation options have been set.
Secondly we may be able to compile views in the Cofoundry package assemblies to avoid the need for the
Note that work is being done by the asp.net team to improve support for view compilation in class libraries, see razor issue 1809
ASP.NET Core 2.1 has introduced the Razor SDK that can be used to embed views in an assembly. It's not immediately clear to me if this will fix any of our issues directly as there's not great detail in the documentation at present and might take some digging and experimentation to work out how exactly a project needs to be setup and what changes need to be made to our file provider to enable the views. Here's some resources that may be useful: