Appveyor nuget 分析器 [英] Appveyor nuget analyser
问题描述
我正在尝试发明将我的 Roslyn 分析器项目打包到 NuGet 中的好方法.它需要将 .dll
放入 \analyzer\
而不是 \lib\
的特定 NuGet 包结构.
I'm trying to invent good way to pack my Roslyn analyzer projects into NuGet.
It requires specific NuGet package structure with .dll
put into \analyzer\
, not \lib\
.
为此,我必须调用 nuget pack
,而不是 nuget pack
.但是如果我使用 nuspec
,那么 $version$ 标签就会被忽略.
For this to work, I have to call nuget pack <name>.nuspec
, not nuget pack <name>.csproj
. But if I use nuspec
, than $version$ tag gets ignored.
似乎我唯一的选择是在每次重建时手动更新 .nuspec
中的版本.实现此目标的正确和正确方法是什么?
Seems that my only option is to manually update version in .nuspec
on every rebuild. What is correct and right way to accomplish this?
推荐答案
正确的做法是:
- 从 .csproj 调用 nuget pack .nuspec
- 从Assembly 中提取的Pass Version 作为参数.
- 在重建时更新 Appveyor 版本
- 配置 Appveyor 以将 .nupkg 捕获到工件并将其推送.
以https://github.com/leotsarev/hardcode-analyzer为例
这篇关于Appveyor nuget 分析器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!