Reputation: 1593
Why last folder before $(FileName), e.g. "dummy removed by MSBuild" is totally ignored by Visual Studio when displaying files ?
<ItemGroup>
<!-- Protobuf files for ReSharper -->
<Content Include="$(SolutionDir)packages\Google.Protobuf.Tools.*\tools\google\protobuf\**\*.proto">
<Link>google\protobuf\dummy removed by MSBuild\$(FileName)</Link>
</Content>
</ItemGroup>
Upvotes: 1
Views: 49
Reputation: 76870
Why last folder before $(FileName), e.g. "dummy removed by MSBuild" is totally ignored by Visual Studio when displaying files ?
Bold guess, you want to use $(FileName)
to get the file name of those .proto
files.
To accomplish this, you should use %(Content.Filename)
instead of $(FileName)
, so the code looks like:
<ItemGroup>
<Content Include="$(SolutionDir)packages\Google.Protobuf.Tools.*\tools\google\protobuf\**\*.proto">
<Link>google\protobuf\dummy removed by MSBuild\%(Content.Filename)</Link>
</Content>
</ItemGroup>
With above code, those .proto
files are display in the solution explorer under the dummy removed by MSBuild folder:
Hope this helps.
Upvotes: 2