Using JetBrains Rider I have created a NuGet package that simply copies some files to a specific path. However, when these physical .cshtml files are copied, a related linked file is also generated. This issue does not occur with other file types included in the same package. Additionally, the physical .cshtml files that are copied are full of errors because they cannot find the necessary libraries.
I am trying to understand why these linked files are being created and whether this is an issue with Rider or if I am doing something wrong in my package configuration.
Here is the relevant section of my .csproj file:
<ItemGroup Label="FilesToCopy">
<Content Include="PskNavigation.targets" PackagePath="build/PskNavigation.targets"/>
<Content Include="ViewsMacroPartialsPSKNavigation.cshtml" Pack="true">
<PackageCopyToOutput>true</PackageCopyToOutput>
</Content>
<Content Include="scriptspsk-navigation.js" Pack="true">
<PackageCopyToOutput>true</PackageCopyToOutput>
</Content>
</ItemGroup>
Why are these linked files only appearing for .cshtml files in Rider, and how can I prevent this from happening?
Attached is a screenshot of my Solution Explorer view showing the linked files issue:
Any help would be greatly appreciated.