Skip to content

Conversation

tmds
Copy link
Member

@tmds tmds commented Jan 6, 2025

@ghost ghost added the area-System.Security label Jan 6, 2025
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Jan 6, 2025
@tmds
Copy link
Member Author

tmds commented Jan 6, 2025

I validated this fixes the issue we see in our internal CI.

<!-- NuGet restore issue with TargetFrameworks in f# projects: https://github.com/NuGet/Home/issues/10005 -->
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<!-- Public signing (performed under DotNetBuildSourceOnly) is broken for f#: https://github.com/dotnet/fsharp/issues/17451 -->
<SignAssembly Condition="'$(DotNetBuildSourceOnly)' == 'true'">false</SignAssembly>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it make more sense to apply this to all fsproj files from a shared rule, and then remove it from the shared rule when the signing bug is fixed?

e.g. a rule that looks at the project file extension in a dirs.props or dirs.targets?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we want to apply this more general, we should probably do it in arcade ProjectDefaults.props.

This is a workaround for just this project (which seems to be the only affected).

@ViktorHofer @mmitche what is your preference?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. Please make the change in Arcade, probably under Workaround.targets.

@tmds
Copy link
Member Author

tmds commented Jan 7, 2025

Closing in favor of dotnet/arcade#15380.

@tmds
Copy link
Member Author

tmds commented Jan 16, 2025

I'm re-opening this because the attempt to generally tackle this in arcade failed, see dotnet/arcade#15420.

I would prefer to make this change rather than try to add more complex logic to arcade.

@ViktorHofer
Copy link
Member

There's already a tracking issue for the failing test: #111460. Not sure why BuildAnalysis doesn't see it.

/ba-g ignore

@ViktorHofer ViktorHofer merged commit 9599b26 into dotnet:main Jan 16, 2025
79 of 82 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Feb 16, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-System.Security community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

System.Formats.Cbor.Tests.DataModel.fsproj gets compiled with --publicsign+ when DotNetBuildSourceOnly=true

3 participants