在生成后事件更新本地的NuGet包

编程入门 行业动态 更新时间:2024-10-27 10:22:30
本文介绍了在生成后事件更新本地的NuGet包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我分别都有我的本地的NuGet库库对我个人和工作releted类库。

I have my local nuget library repository separately both for my personal and work releted class libraries.

我已经创造了一些的NuGet包对于那些不再开发库。我这样做,只有适合自己的,因为我不知道怎么就会自动更新它们作为我的生成项目。

I have created some of the nuget packages for the libraries which are no longer in development. I did this only for them because I do not know how to update them automatically as soon as my project builds.

我想通了所有的工作正在通过与Visual Studio命令提示符的NuGet命令行完成。所以,我可以很容易做到我所需要的工作(当然我会知道的命令完美,我不要!)

I have figured that all the work is being done by nuget command line with Visual Studio Command Prompt. So I can easily do the work I needed (of course I would know commands perfectly and I do not !)

基本上我想下面的任务在我的项目的生成后事件中执行。

Basically I want the following tasks to execute on the post-build event of my project.

在项目构建:

  • 复制项目的dll到一个特定的文件夹(包的NuGet的lib文件夹中)
  • 更新新文件版本nuspec文件(我的项目增加了人们对每次构建的文件版本)
  • 创建新的文件版本新nupkg文件
  • 菲尔哈克显示了这个功能,但它仍然是一个原型,据我可以告诉。

    Phil Haack shows some of this feature but it is still a prototype as far as I can tell.

    所以,我的要求是上面。有没有其他人做到了这一点?

    So my requirement is the above. Has anyone else accomplished this?

    推荐答案

    杰里米·斯金纳写a关于他如何执行自动的博客帖子建立包并上传到的NuGet画廊。我认为你的要求相匹配。

    Jeremy Skinner has written a blog post on how he performs automated builds of packages and uploads them to the NuGet Gallery. I think that it matches your requirements.

    基本上,他使用的MSBuild应用的版本(与的MSBuild社区扩展如updateXML任务)的nuspec文件并调用的NuGet。 exe文件打包起来。

    Basically he uses MsBuild to apply the version (with the MsBuild Community Extensions UpdateXml task) to the nuspec file and invoke the nuget.exe to package it up.

    更多推荐

    在生成后事件更新本地的NuGet包

    本文发布于:2023-11-13 10:12:32,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1584104.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:事件   NuGet

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!