VSTS构建-替换令牌“版本"没有价值 [英] VSTS Build - The replacement token 'version' has no value

查看:66
本文介绍了VSTS构建-替换令牌“版本"没有价值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在Visual Studio Team Services(当时是Visual Studio Online)中设置了我的第一个生成定义.

I have setup my very first Build definition in Visual Studio Team Services (was Visual Studio Online).

它会构建,所有测试都通过,然后最终弹出此错误:

It builds, all tests pass and then it finally pops this error:

尝试从"EvoqPortaCoreDistrib.nuspec"构建软件包. 替换令牌版本"没有价值. 从工具NuGet.exe返回的意外退出代码1

Attempting to build package from 'EvoqPortaCoreDistrib.nuspec'. The replacement token 'version' has no value. Unexpected exit code 1 returned from tool NuGet.exe

这是在清除了我的nuspec文件中发现的其他一些问题之后.尽管很奇怪,但我已经使用此nuspec将软件包从台式PC手动推送到托管在其他位置的feed中.区别在于我今天已更新到NuGet 3.3.

This is after clearing some other problems it found with my nuspec file. Though oddly enough, I've used this nuspec to push packages manually from my desktop PC to a feed hosted somewhere else. The difference being that I've updated to NuGet 3.3 today.

所以它说没有汇编版本吗?坦白地说,这是不可能的.

So its saying that there's no assembly version? Which is frankly, impossible.

推荐答案

继续.显然,当您提供自己的.nuspec文件时,VSO版本会变得毫无用处.

Hang on. Apparently, when you supply your own .nuspec file, the VSO build goes all dumb.

https://msdn. microsoft.com/en-us/Library/vs/alm/Build/steps/package/nuget-packager

打包程序不会编译.csproj文件进行打包.每个 仅当项目已签入.nuspec文件时,该项目才会打包. 打包程序不会替换.nuspec文件中的令牌( 元素,请参阅下面的使用内部版本号对程序包进行版本控制). 您必须为和提供元素的值. 最常见的方法是将值硬编码到 .nu​​spec文件.

The packager does not compile the .csproj files for packaging. Each project is packaged only if it has a .nuspec file checked in. The packager does not replace tokens in the .nuspec file (except the element, see Use build number to version package, below). You must supply values for elements such as and . The most common way to do this is to hardcode the values in the .nuspec file.

所以我要取出我的.nuspec文件.

So I'll take out my .nuspec file.

这篇关于VSTS构建-替换令牌“版本"没有价值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆