When using examples such as
<!--Include in publish-->
<ItemGroup>
<None Include="exampleDirectory\**\*.*" CopyToOutputDirectory="Always" CopyToPublishDirectory="Always" />
</ItemGroup>
This folder has .cshtml and .cshtml.cs files but only the .cshtml.cs files are copied. Is there a specific reason these files do not copy over?
Copy and paste of the required folder into the publish output directory works. Meaning if this copy mechanism just worked and copied all the files this wouldn't be an issue.
I have it setup as <None because I need to have two directories and using <Content gives an error of having two contents being used.
C:\Program Files\dotnet\sdk\3.1.404\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.DefaultItems.targets(318,5): error NETSDK1022: Duplicate 'Content' items were included. The .NET SDK includes 'Content' i
tems from your project directory by default. You can either remove these items from your project file, or set the 'EnableDefaultContentItems' property to 'false' if you want to explicitly include them in yo
ur project file. For more information, see https://aka.ms/sdkimplicititems. The duplicate items were: 'dirName\fileName.cshtml'; 'dirName\fileName.cshtml' [C:\path\to\projectName.csproj]
Which when set to false for EnableDefaultContentItems it still does not copy the .cshtml files, just the .cshtml.cs files.