NuGet Packager不允许在VSTS中使用预发布依赖项

时间:2016-11-14 09:21:24

标签: nuget-package

当NuGet创建我的包时,我收到一个包含预发行包的错误,它给了我以下结果:

C:\LR\Mms\Services\Mms\TaskAgentProvisioner\Tools\agents\2.109.1\externals\nuget\NuGet.exe pack "C:\a\1\s\Harvest.Auth\Harvest.Auth.csproj" -OutputDirectory "C:\a\1\s" -Properties Configuration=release -version 1.0.1
MSBuild auto-detection: using msbuild version '14.0' from 'C:\Program Files (x86)\MSBuild\14.0\bin'.
Attempting to build package from 'Harvest.Auth.csproj'.
Packing files from 'C:\a\1\s\Harvest.Auth\bin\Release'.
Found packages.config. Using packages listed as dependencies
A stable release of a package should not have on a prerelease dependency. Either modify the version spec of dependency "Microsoft.Experimental.IdentityModel.Clients.ActiveDirectory (≥ 4.0.209160138-alpha)" or update the version field.
System.Exception: Unexpected exit code 1 returned from tool NuGet.exe
   at Microsoft.TeamFoundation.DistributedTask.Task.Internal.InvokeToolCmdlet.ProcessRecord()
   at System.Management.Automation.CommandProcessor.ProcessRecord()
PowerShell script completed with 1 errors.

我知道我需要将我的NuGet包标记为预发行版,但是你可以在第一行看到它没有正确地拾取我的标签和版本1.0.1-alpha,它只能获得1.0.1。< / p>

我还尝试根据位于here的NuGet文档添加[assembly: AssemblyInformationalVersion("1.0.1-alpha")],但这也不起作用。

我希望有一个命令行可以强制它创建,因为我们在内部使用它,并不关心它是否是预发布。这是pack命令。

我还应该注意,我们正在使用属于VSTS的NuGet打包器。

0 个答案:

没有答案