.net - nuget 打包程序集时,nuspec 文件中的 $version$ 令牌未从 AssemblyInfo.cs 读取
问题描述
单独运行“nuget pack”时,它似乎会读取 csproj 文件并使用“版本”,我想自动增加构建版本号。
运行“nuget pack nuspec.nuspec”时,它会读取 nuspec 文件,但会产生此错误:“尝试解析清单文件中属性 'version' 的值 '' 时发生错误”
问题:如何自动增加 nuget 包的版本值?我已经设法自动增加程序集信息版本,但我无法让 nuget 从文件中读取。我只需要一个基本的 nuget 包构建版本增量。主要版本之类的东西可以手动更改。
我正在使用 .net 框架和 nuget.exe。版本 5.8.1.7021
解决方案
Actually, this is an issue on the latest recommended nuget.exe v5.8.1
. I have tested it several times and all failed. Also, nuget.exe v5.7.0
has the same issue.
Solution
So I suggest you could try to use nuget.exe v5.6.0. It works well without any issues.
Besides, I have reported the issue on our DC Forum. You can vote it and add any comments if I did not describe it in detail. Please track this ticket.
推荐阅读
- git - 阻止文件在 git 中显示为已更改,但在 repo 中保留原始文件
- java - 我有一个错误:类型 org.json.JSONObject 无法转换为 JSONArray
- mysql - 在 laravel 雄辩的上下文中等效的 SQL 减号运算符
- android - 如何更改“Android Studio”中的应用栏标题?
- c# - 如何过滤 GridView 数据,例如。第二个或第十个字符,DevExpress Winforms?
- python - 如何在 Python 中使用 Selenium 获取 youtube 标签?
- mongodb - MongoDB - 更新 TTL 索引值
- c# - 在 WPF/MVVM 中动态添加用户控件
- reactjs - 如何使用测试库和graphql修复错误“缺少字段名称”?
- reactjs - react-navigation 导航不是函数错误。- 类组件