cake-build / cake

:cake: Cake (C# Make) is a cross platform build automation system.
https://cakebuild.net
MIT License
3.85k stars 724 forks source link

Add PublishReadyToRun to DotNetRestoreSettings #4109

Closed augustoproiete closed 1 year ago

augustoproiete commented 1 year ago

Discussed in https://github.com/orgs/cake-build/discussions/4108

Originally posted by **Trisped** January 19, 2023 According to https://learn.microsoft.com/en-us/dotnet/core/compatibility/sdk/6.0/publish-readytorun-requires-restore-change#recommended-action : > In .NET 6, dotnet restore followed by dotnet publish -p:PublishReadyToRun=true --no-restore will fail with the NETSDK1095 error. This is because the crossgen binary is now shipped as a separate NuGet package, and so needs to be part of the restore operation for publishing to succeed. According to https://cakebuild.net/api/Cake.Common.Tools.DotNet.Restore/DotNetRestoreSettings/ , there is not a PublishReadyToRun property like there is in DotNetPublishSettings. There is a work around (set NoRestore to false), but it requires restoring twice, if you have already restored (for example, so you could test before publishing).
SARAVANA1501 commented 1 year ago

Is it up for contribution?

augustoproiete commented 1 year ago

Hey @SARAVANA1501, no this one already has a pull-request that is waiting to be merged - https://github.com/cake-build/cake/pull/4110

augustoproiete commented 1 year ago

Assigned to @Marusyk

cake-build-bot commented 1 year ago

:tada: This issue has been resolved in version v3.1.0 :tada:

The release is available on:

Your GitReleaseManager bot :package::rocket: