Skip to content

Update the NuGet package generation to include 'cimcmdlet.dll' and most of the built-in modules #11832

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

Merged
merged 4 commits into from
Feb 12, 2020

Conversation

daxian-dbw
Copy link
Member

@daxian-dbw daxian-dbw commented Feb 11, 2020

PR Summary

Fix #11783

  • Generate and include Microsoft.Management.Infrastructure.CimCmdlets NuGet package
  • Include all built-in module folders in Microsoft.PowerShell.SDK NuGet package except for the PSDesiredConfiguration module.
    • PSDesiredConfiguration module is not included because it has files in nested folders, which cause the file path length to be more than 180 in the dotnet-interactive global tool, so it will require the long path support to work. I'm not sure if this would be a problem, and thus don't have it included.

PR Context

PR Checklist

@daxian-dbw
Copy link
Member Author

daxian-dbw commented Feb 11, 2020

The solution is not perfect.

This fix targets dotnet publish because that's what we use for both the Azure Function worker and dotnet-interactive global tool.
Most hosting application probably can be covered by this usage to generate a self-contained package that is portable to all platforms.
It turns out dotnet build also generates the runtime folder in the build output folder, so it works fine for dotnet build.

For dotnet publish -runtime <rid>, this could be used by a hosting application in case the dotnet runtime is not installed on the target platform, but since the content files will be bin-placed to the output folder, the hosting application author can always write a simple post build script to correct the path and make it work. So I think we are fine there.

@daxian-dbw daxian-dbw added the CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log label Feb 11, 2020
@daxian-dbw daxian-dbw added this to the GA-consider milestone Feb 11, 2020
@adityapatwardhan
Copy link
Member

@daxian-dbw If a doc issue was filed, please add the link in the description

@adityapatwardhan adityapatwardhan merged commit 78a2101 into PowerShell:master Feb 12, 2020
@daxian-dbw daxian-dbw deleted the nuget branch February 12, 2020 00:28
@TravisEz13 TravisEz13 modified the milestones: GA-consider, 7.0.0 Feb 12, 2020
adityapatwardhan pushed a commit to adityapatwardhan/PowerShell that referenced this pull request Feb 18, 2020
@ghost
Copy link

ghost commented Feb 21, 2020

🎉v7.0.0-rc.3 has been released which incorporates this pull request.:tada:

Handy links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Publish PowerShell built-in modules along with the NuGet packages for hosting applications to include
3 participants