With the new .csproj
format (as well as the old), it is possible to add files as linked outside of the project folder:
<EmbeddedResource Include="......DemoSample.cs" Link="ResourcesSample.cs" />
It is also possible to use a glob pattern to include multiple files:
<EmbeddedResource Include="......Demo*.cs" />
But how do you combine the two?
What I Tried
<EmbeddedResource Include="......Demo*.cs" Link="Resources*.cs" />
<EmbeddedResource Include="......Demo*.cs" Link="Resources*" />
<EmbeddedResource Include="......Demo*.cs" Link="Resources" />
The first two only create a single linked file (with exactly the name *.cs
and *
respectively). The third simply errors out.
Is there a way to combine globbing with linked files to a specific location in the target project? If not, how can I link all the files in a directory without knowing how many or what their names are?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…