I am publishing an ASP.NET Core 1.1 application, and I need to remove several folders (fr; nl; pt) created by the library (Fluent Validation) from the output:
<ItemGroup> <FluentValidationExcludedCultures Include="fr;nl;pt"> <InProject>false</InProject> </FluentValidationExcludedCultures> </ItemGroup> <Target Name="RemoveTranslationsAfterBuild" AfterTargets="AfterBuild"> <RemoveDir Directories="@(FluentValidationExcludedCultures->'$(OutputPath)%(Filename)')" /> </Target>
But this does not work, and the folders are still copied ... Then I tried:
<ItemGroup> <Content Include="fr" CopyToPublishDirectory="Never" /> <Content Include="nl" CopyToPublishDirectory="Never" /> <Content Include="pt" CopyToPublishDirectory="Never" /> </ItemGroup>
But that didn't work either ...
Does anyone know how to do this?
source share