Appveyor nuget 分析器 [英] Appveyor nuget analyser

查看:71
本文介绍了Appveyor nuget 分析器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试发明将我的 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 .nuspec,而不是 nuget pack .csproj.但是如果我使用 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?

推荐答案

正确的做法是:

  1. 从 .csproj 调用 nuget pack .nuspec
  2. 从Assembly 中提取的Pass Version 作为参数.
  3. 在重建时更新 Appveyor 版本
  4. 配置 Appveyor 以将 .nupkg 捕获到工件并将其推送.

https://github.com/leotsarev/hardcode-analyzer为例

这篇关于Appveyor nuget 分析器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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