Folks, I need to publish different *.js files depending upon the selected $(Configuration). I have VS2019 configs for Debug, AU region and US region. I tried editing the csproj file to have conditions around the files, like this fragment for the US.
<ItemGroup Condition="'$(Configuration)'=='Release US'"> <Content Include="wwwroot\script\app-us.js"/> </ItemGroup> It does nothing, so I tried <None Remove> and <Content Remove> and CopyToPublishDirectory in a dozen combinations, but I either get no files or all files. I'm clearly bumbling around uselessly, so maybe someone has done this before and can reveal what tricks are required. I'm just using VS2019 publish project command, so that's when I want the conditions to run. Maybe ItemGroup conditions are meaningless for publish? I dunno because web searches produce confusing and contradictory samples and the MSDN documentation doesn't seem to cover what I'm doing. Thanks, *Greg*