Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PublishReadyToRun to DotNetRestoreSettings #4109

Closed
augustoproiete opened this issue Jan 20, 2023 Discussed in #4108 · 4 comments · Fixed by #4110
Closed

Add PublishReadyToRun to DotNetRestoreSettings #4109

augustoproiete opened this issue Jan 20, 2023 Discussed in #4108 · 4 comments · Fixed by #4110
Milestone

Comments

@augustoproiete
Copy link
Member

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
Copy link

Is it up for contribution?

@augustoproiete
Copy link
Member Author

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

@augustoproiete
Copy link
Member Author

Assigned to @Marusyk

@devlead devlead modified the milestones: Next Minor Candidate, v3.1.0 Jun 29, 2023
devlead added a commit that referenced this issue Jun 29, 2023
GH-4109: Add PublishReadyToRun to DotNetRestoreSettings
@cake-build-bot
Copy link

🎉 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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants