MyFile.properties
MyFile_de_DE.properties
MyFile_fr_FR.properties
etc.
Here is what my csproj looked like:
<PropertyGroup> <ReportingEnglishLocFolder>$(SolutionDir)..\path\to\destination\</ReportingEnglishLocFolder> </PropertyGroup> <ItemGroup> <EnglishLocPropertiesFiles Include="$(ReportingBaseFolder)master\*.properties" Exclude="*_de_DE.properties"/> </ItemGroup> <Copy SourceFiles="@(EnglishLocPropertiesFiles)" DestinationFolder="$(ReportingEnglishLocFolder)" />After attempting multiple combinations of wildcard patterns and having no success, I changed the search phrases I used to search the internet and found the stackoverflow thread.
The most important part from the thread, and the most important thing to remember about using Include and Exclude is:
If you use an absolute path for Include, you must use an absolute path for Exclude. If you use a relative path for Include, you must use a relative path for both.So I changed to this and it worked like a champ!
<ItemGroup> <EnglishLocPropertiesFiles Include="$(ReportingBaseFolder)master\*.properties" Exclude="$(ReportingBaseFolder)master\*_de_DE.properties"/> </ItemGroup>
So remember, whichever type of path you use for Include, you need to do the same for Exclude.
No comments:
Post a Comment