Ensure Umbraco Razor files are compiled into <project>.Views.dll
It worked properly if the Umbraco files are on disk before a build but when the files are not there yet or a dotnet clean is done first the files are not compiled. This is often the case on build servers that start with a clean working directory for each build. Using this target we simply ensure the files are included as "Content" which Razor will scan for .cshtml files in their "ResolveRazorGenerateInputs" target.
This commit is contained in:
@@ -87,4 +87,10 @@
|
||||
<RemoveDir Directories="@(WwwrootUmbracoPackageDir)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="IncludeUmbracoRazorFiles" BeforeTargets="ResolveRazorGenerateInputs">
|
||||
<ItemGroup>
|
||||
<Content Include="$(MSBuildProjectDirectory)\umbraco\**\*.cshtml" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
|
||||
Reference in New Issue
Block a user