I have three referenced content folders from another project in my .csproj
file:
<Content Include="..\infrastructure\Content\**\*.*">
<Link>Infrastructure\Content\%(RecursiveDir)%(FileName)%(Extension)</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="..\infrastructure\fonts\**\*.*">
<Link>Infrastructure\fonts\%(RecursiveDir)%(FileName)%(Extension)</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="..\infrastructure\Scripts\**\*.*">
<Link>Infrastructure\Scripts\%(RecursiveDir)%(FileName)%(Extension)</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
I want to create a nuget
package from my project without the included content files. I have tried this command:
nuget pack sampleproj.csproj -Exclude ../infrastructure/** -NoDefaultExcludes -IncludeReferencedProjects -Verbosity detailed
But it includes the above files. I have also tried these arguments for -Exclude
with no success:
infrastructure/**
../../infrastructure/**
bin/infrastructure/**
When I use **/infrastructure/**
it works, but also excludes some files that I need them to be packaged.
How can I exclude referenced content files?
P.S: in my .nuspc
file I have only one file
element: <file src="cassette-cache\**" target="Content" />
.