How to author 'dotnet tool' packages that are CPU-architecture (or OS) specific? #24016
Open
Description
I build a few dotnet CLI tool packages, but I don't know what to do about tools that target specific CPU platforms. For example one of my tools has a native dependency so it's fundamentally locked to x64. But I am happy to target arm64 as well and bring those native dependencies with it. But can I do this in such a way that the tool package includes everything (x64 and arm64 binaries) and have the dotnet
CLI tools just pick the right runtime binaries based on the OS architecture?
Similar question for targeting OSs: I can multi-target with net6.0-windows7;net6.0-linux
etc, but unless the .targets that pack the tool take all the output and arrange it (considering both TFM and RID), it won't really do me any good.