ljrk, I have multiple projects that can support net7.0-windows on, well Windows, and net48 on Windows and Unix (through #Mono) in one solution. This works fine if I build #Linux on Linux and #Windows on Windows, but if I choose to specify the target OS using
dotnet build --os
or the runtimedotnet build --runtime
explicitly (they both amount to the same thing), either for cross-compilation or even when it matches the host, this breaks horribly since specifying a RID (Runtime Identifier) on solution level is not possible since .NET 5.0 and errors with #NETSDK1134. This is well-known and there's also a really weird workaround:https://github.com/dotnet/sdk/issues/14281#issuecomment-1247327343
Setting
-p:ImportByWildcardBeforeSolution=false
also works... . Apparently there's no incentive to fix this anytime soon :(