NuGet Error NU5042
`project.json` pack is disabled in the current NuGet version, and will be permanently removed in a future version. Please consider migrating 'MyProject' to `PackageReference` and using the pack targets. You can set the 'NUGET_ENABLE_LEGACY_PROJECT_JSON_PACK' environment variable to 'true' to temporarily reenable this functionality.
Issue
NuGet.exe pack for project.json projects is not supported.
Solution
Migrate your project to PackageReference and use the pack targets instead.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for