would it be possible to add the `RollForward` MSBuild property to the binary/library targets?
Given that .NET SDK versions don't roll forward automatically, the RollForward MSBuild property is quite useful; in particular with the imminence of a .NET 8 release, as there are .NET 7-based apps that can run on — and are compatible with — systems where only .NET SDK 8 is/will be installed.
Would it be possible to add this property to the binary/library targets?
I'm not familiar with internal Bazel development, but from what I see here adding this property doesn't involve a lot of complexities... that said, if you provide with some guidance, then I could give it a try myself. 🙂
I think this should be fairly straight forward to add. Just add it to the attrs for the binary targets here: https://github.com/bazelbuild/rules_dotnet/blob/37f965492aebc001d77f94e40bfa008d0b53299c/dotnet/private/rules/common/attrs.bzl#L180
And then it has to forwarded to where we generate the runtimeconfig.json: https://github.com/bazelbuild/rules_dotnet/blob/37f965492aebc001d77f94e40bfa008d0b53299c/dotnet/private/rules/common/binary.bzl#L105 https://github.com/bazelbuild/rules_dotnet/blob/37f965492aebc001d77f94e40bfa008d0b53299c/dotnet/private/rules/publish_binary/publish_binary.bzl#L202
And then add a test that verifies that it works.
If you could try and see if you could add this functionality then that would be appreciated, I've got limited capacity at the moment but will gladly review a PR with this functionality.
This has now been added to the publish_binary rule.