-
Notifications
You must be signed in to change notification settings - Fork 136
Publish-Module throws error "Failed to generate the compressed file for module 'Microsoft (R) Build Engine version 15.7.179.6572 for .NET Core'" #303
Description
I'm currently putting together a demo that involves publishing a module using Publish-Module to a target NuGet server. I'm currently experiencing this on MacOS 10.12.6. The command and output I see are below:
Publish-Module -Path MyCustomSolution -NuGetApiKey $APIKey -Repository PublishTarget -Verbose
VERBOSE: Repository details, Name = 'PublishTarget', Location = 'http://SERVERNAME/nuget/modules/'; IsTrusted = 'True'; IsRegistered = 'True'.
VERBOSE: Repository details, Name = 'PublishTarget', Location = 'http://SERVERNAME/nuget/modules/'; IsTrusted = 'True'; IsRegistered = 'True'.
VERBOSE: Repository details, Name = 'PublishTarget', Location = 'http://SERVERNAME/nuget/modules/'; IsTrusted = 'True'; IsRegistered = 'True'.
VERBOSE: Publish Location:'http://SERVERNAME/nuget/modules/'.
VERBOSE: Loading module from path '/codebuild/output/src484376618/src/git-codecommit.ap-southeast-2.amazonaws.com/v1/repos/PowerShellDemo/MyCustomSolution/CoreCommands.psm1'.
VERBOSE: Module 'MyCustomSolution' was found in '/codebuild/output/src484376618/src/git-codecommit.ap-southeast-2.amazonaws.com/v1/repos/PowerShellDemo/MyCustomSolution'.
VERBOSE: Loading module from path '/tmp/128535449/MyCustomSolution/CoreCommands.psm1'.
VERBOSE: Repository details, Name = 'PublishTarget', Location = 'http://SERVERNAME/nuget/modules/'; IsTrusted = 'True'; IsRegistered = 'True'.
VERBOSE: Using the provider 'PowerShellGet' for searching packages.
VERBOSE: Using the specified source names : 'PublishTarget'.
VERBOSE: Getting the provider object for the PackageManagement Provider 'NuGet'.
VERBOSE: The specified Location is 'http://SERVERNAME/nuget/modules/' and PackageManagementProvider is 'NuGet'.
VERBOSE: Searching repository 'http://SERVERNAME/nuget/modules/FindPackagesById()?id='MyCustomSolution'' for ''.
VERBOSE: Total package yield:'0' for the specified package 'MyCustomSolution'.
VERBOSE: Performing the operation "Publish-Module" on target "Version '1.0.0.0' of module 'MyCustomSolution'".
Publish-PSArtifactUtility : Failed to generate the compressed file for module 'Microsoft (R) Build Engine version 15.7.179.6572 for .NET Core'.
At /opt/microsoft/powershell/6.1.0~preview.2/Modules/PowerShellGet/1.6.0/PSModule.psm1:1447 char:17
+ ... Publish-PSArtifactUtility @PublishPSArtifactUtility_Param ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : FailedToCreateCompressedModule,Publish-PSArtifactUtility
Expected Behavior
Publish-Module should publish the module with no issues
Current Behavior
Getting error as described above
Steps to Reproduce (for bugs)
I have just an example PowerShell module at the moment, it loads up and runs locally no issues. When I call the publish command shown above it gives the error.
Context
This is about as bare of a solution as I can come up with right now, nothing complicated in the module itself, just trying to validate that publish-module will work from MacOS and then also from Ubuntu 14.04 once I get this going.
Your Environment
MacOS running PowerShell 6rc2, .net core 2.1 installed. Here's the output of PSVersionTable
Name Value
PSVersion 6.0.0-rc.2
PSEdition Core
GitCommitId v6.0.0-rc.2
OS Darwin 16.7.0 Darwin Kernel Version 16.7.0: Thu Jun 21 20:07:39 PDT 2018; root:xnu-3789.73.14~1/RELEASE_X86_64
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Get-Module -ListAvailable PowerShellGet,PackageManagement
ModuleType Version Name ExportedCommands
Script 1.1.7.0 PackageManagement {Find-Package, Get-Package, Get-PackageProvider, Get-PackageSource...}
Script 1.6.0 PowerShellGet {Install-Module, Find-Module, Save-Module, Update-Module...}
Get-PackageProvider
Name Version DynamicOptions
NuGet 2.8.5.210 Destination, ExcludeVersion, Scope, SkipDependencies, Headers, FilterOnTag, Contains, AllowPrereleaseVersions, ConfigFile, SkipValidate
PowerShellGet 1.6.0.0 PackageManagementProvider, Type, Scope, AllowClobber, SkipPublisherCheck, InstallUpdate, NoPathUpdate, AllowPrereleaseVersions, Filter, Tag, Include...