I am helping refactor some code so that it builds on both Windows and Linux.
All is well until an external, 3rd party, tool is needed.
Under windows this has been copied to the output folder via some lines in the csproj file
<ItemGroup>
<Content Include="xxxxxxxx.exe">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
All OK. However under Linux this is not appropriate as the external module must be installed in its own right.
I cant seem to find an appropriate ‘condition’ to add to this so it only applies if it is being built for windows.
(If it is inside the code the condition I am looking for is if (OperatingSystem.IsWindows() )
)
Can this be done and if so how ?
Thanks for any help
JC