I have written a prototype RCL, which contains the following structure:
Now I want to implement this logic to override the local files in an another web app, using this directory structure above as a framework, which overrides files.
For that I wrote the following .props file:
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"><Target Name="CopyFiles" BeforeTargets="Build"><ItemGroup><File Include="$(MSBuildThisFileDirectory)..\Areas\**\*.*"></File><File Include="$(MSBuildThisFileDirectory)..\Areas\**\**\*.*"></File></ItemGroup><Exec Command="xcopy /I/e/d/s/y %(File.Identity) $(ProjectDir)Pages\Shared"></Exec></Target></Project>
.csproj has this appended:
<ItemGroup><None Include="Areas\**\*.*" Pack="true" PackagePath="Areas"></None><None Include="Areas\**\**\*.*" Pack="true" PackagePath="Areas"></None><None Include="build\libnamehere.props" Pack="true" PackagePath="build"></None></ItemGroup>
But this appears to only copy the .cshtml.cs files, which is not good enough...
How do I copy the .cshtml files as well?
Is there a better method to use the _Layout.cshtml from the RCL?
I am using ASP.NET Core 6 (.NET 6) if that matters.