Skip to content

Add PublishReadyToRun to DotNetRestoreSettings #4109

Closed

Description

@augustoproiete

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).

Activity

  1. SARAVANA1501 commented on Mar 25, 2023

    @SARAVANA1501

    Is it up for contribution?

  2. augustoproiete commented on Mar 27, 2023

    @augustoproiete
    MemberAuthor

    Hey @SARAVANA1501, no this one already has a pull-request that is waiting to be merged - #4110

  3. augustoproiete commented on Mar 27, 2023

    @augustoproiete
    MemberAuthor

    Assigned to @Marusyk

  4. added a commit that references this issue on Apr 4, 2023
  5. added a commit that references this issue on Jun 29, 2023
  6. added a commit that references this issue on Jun 29, 2023
  7. cake-build-bot commented on Jul 9, 2023

    @cake-build-bot

    🎉 This issue has been resolved in version v3.1.0 🎉

    The release is available on:

    Your GitReleaseManager bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions