gpt4 book ai didi

.net - 尝试将 powershell 模块发布到本地存储库时出现“Dotnet 打包失败”错误

转载 作者:行者123 更新时间:2023-12-02 23:07:21 25 4
gpt4 key购买 nike

我正在使用 MacOS 10.15,并且我有 PSRabbitMq 的克隆电源外壳模块。我正在尝试将其发布到我创建的本地存储库中:

Register-PSRepository -Name TestPSRepo -SourceLocation '/tmp/powershell_test_repository' -InstallationPolicy Trusted
Publish-Module -Path '<path_to_module>/PSRabbitMq' -Repository TestPSRepo -NuGetApiKey 'test' -Verbose

收到此错误:
Publish-PSArtifactUtility : Failed to generate the compressed file for module '/usr/local/bin/dotnet failed to pack: error
'.
At /Users/my_user/.local/share/powershell/Modules/PowerShellGet/2.2.1/PSModule.psm1:10944 char:17
+ ... Publish-PSArtifactUtility @PublishPSArtifactUtility_Param ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : FailedToCreateCompressedModule,Publish-PSArtifactUtility

(我安装了 dotnet-runtime-3.0.0-osx)

有谁知道这个错误是怎么回事?

谢谢!

最佳答案

我想到了。

我有 dotnet已安装而不是 dotnet-sdk .

brew cask uninstall dotnet
brew cask install dotnet-sdk

解决了我的问题。

我希望它在某个时候对其他人有用。

关于.net - 尝试将 powershell 模块发布到本地存储库时出现“Dotnet 打包失败”错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59248123/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com