Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/blackberry/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Windows 使用巧克力制作自己的包装_Windows_Nuget_Package Managers_Chocolatey - Fatal编程技术网

Windows 使用巧克力制作自己的包装

Windows 使用巧克力制作自己的包装,windows,nuget,package-managers,chocolatey,Windows,Nuget,Package Managers,Chocolatey,我正在尝试为一个名为的应用程序创建一个包含巧克力的包。我已经按照网站上的说明以及文章中的说明进行了操作 我还创建了一个帐户,并使用 nuget setApiKey-源代码 其中<apiKey>将替换为您的API密钥 当我输入命令choco-pack来创建NuGet包时,它说成功创建了包,但当我测试刚刚使用cinst-Listary-source-Listary.1.0.nupkg-force创建的包时,它说 Invalid URI: The format of the URI could n

我正在尝试为一个名为的应用程序创建一个包含巧克力的包。我已经按照网站上的说明以及文章中的说明进行了操作

我还创建了一个帐户,并使用

nuget setApiKey-源代码

其中<apiKey>将替换为您的API密钥

当我输入命令
choco-pack
来创建NuGet包时,它说成功创建了包,但当我测试刚刚使用cinst-Listary-source-Listary.1.0.nupkg-force创建的包时,它说

Invalid URI: The format of the URI could not be determined.

Command 'install' failed (sometimes this indicates a partial failure). Additional info/packages: Listary
这是我在Listary.nuspec文件中的内容

<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
  <metadata>
    <id>Listary</id>
    <title>Listary</title>
    <version>1.0</version>
    <authors>Zhenheng Dai</authors>
    <owners>Zhenheng Dai</owners>
    <summary>Keep files at your fingertips. Listary is a unique search utility for Windows.</summary>
    <description>Listary is a unique search utility for Windows. Not only does it make file browsing truly flexible -- thanks to its multi-file managers support -- but the ultra-compact UI also redefines minimalism. The lightweight design doesn't stop it from providing various advanced features however, that may fit the needs of both casual and power users alike. All you have to do is just type the file name that you’re looking for, and Listary will display the search results at breakneck speed.</description>
    <projectUrl>http://www.listary.com</projectUrl>
    <tags>listary search find filemanager admin</tags>
    <copyright></copyright>
    <requireLicenseAcceptance>false</requireLicenseAcceptance>
    <releaseNotes></releaseNotes>
  </metadata>
  <files>
    <file src="tools\**" target="tools" />
  </files>
</package>
(固定链接)

注意,源代码不是nupkg,而是找到nupkg文件的目录


在choco.exe(巧克力的转世)中,您可以简单地指向nuspec或nupkg文件进行安装。

当我在nupkg包所在的目录中运行命令
cinst Listary-source%cd%-force
时,我无法找到包“Listary”。由于包所在的完整路径包含空格,我需要用引号将其括起来,因此我需要运行命令
cinst Listary-source“%cd%”-force
。我已经成功上传了这个软件包,你可以在Yeah找到,使用引号也会有所帮助!:)我遇到了一个类似的问题,我需要将包标题加引号,因为标题中有空格。请使用
-s.
\
--source.
-适用于choco 0.9.9+中的cmd.exe和powershell.exe.API密钥设置,即
choco apikey
,并且不再使用nuget配置。
$packageName = 'Listary'
$installerType = 'exe'
$url = 'http://www.listary.com/download/Listary.exe'
$silentArgs = '/SP /VERYSILENT /NORESTART'
Install-ChocolateyPackage "$packageName" "$installerType" "$silentArgs" "$url"