简体   繁体   English

我可以将现有的 NuGet 包上传到 Azure DevOps 工件源吗?

[英]Can I upload existing NuGet packages to an Azure DevOps artifacts feed?

I'm currently migrating from TFS 2012 to Azure DevOps 2019 (both on-premise).我目前正在从 TFS 2012 迁移到 Azure DevOps 2019(均为内部部署)。 With the old server, I would manually create NuGet packages from some of our builds, and host these .nupkg files on a file share (configured as a package source in Visual Studio).使用旧服务器,我会从我们的一些构建中手动创建 NuGet 包,并将这些.nupkg文件托管在文件共享上(在 Visual Studio 中配置为包源)。 With DevOps, I can obviously automate all of this and push the packages straight into an artifact feed.使用 DevOps,我显然可以自动化所有这些并将包直接推送到工件提要中。

The old server needs to be decommissioned, so I would like to move the existing .nupkg files out of the file share into the new artifacts feed.旧服务器需要退役,所以我想将现有的 .nupkg 文件从文件共享中移到新的工件提要中。 Is this possible?这可能吗?

Yes, you can push existing .npukg files to the new feed.是的,您可以将现有的.npukg文件推.npukg新提要。

You can create a simple PowerShell script that pushes to the feed all your .nupkg files:您可以创建一个简单的 PowerShell 脚本,将您的所有.nupkg文件推送到提要:

# If you didn't add the new feed to your NuGet sources so add it:
nuget sources Add -Name "NEW-FEED" -Source "https://pkgs.dev.azure.com/org/_packaging/NEW-FEED/nuget/v3/index.json"
# Put all the nugets in one folder and move to this folder
cd path/to/nupkg/folder
$files = dir
$files.ForEach({
  push -Source "NEW-FEED" -ApiKey AzureDevOps $_.Name
})

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Azure DevOps Artifacts Feed 填充了 NuGet Gallery 包 - Azure DevOps Artifacts Feed fills with NuGet Gallery packages 一些包无法从 Azure DevOps Artifacts feed 下载 NuGet upstream source - Some packages can't be downloaded from Azure DevOps Artifacts feed with NuGet upstream source 从我的 Azure DevOps Artifacts 提要安装上游 NuGet 包(以将它们保存在该提要中)无效 - Installing upstream NuGet packages from my Azure DevOps Artifacts feed (to get them saved in that feed) has no effect Publish.snupkg 到 Azure DevOps 工件 nuget 提要 - Publish .snupkg to Azure DevOps artifacts nuget feed Nuget 在 Azure DevOps 工件提要的 Jenkins 构建期间恢复返回 401 未经授权 - Nuget restore returns 401 unauthorized during Jenkins build for packages in Azure DevOps artifacts feed 为什么我在DevOps Artifacts中的私人Nuget Feed中有Microsoft软件包? - Why are there Microsoft packages in my private Nuget Feed in DevOps Artifacts? 如何将nuget包从AppVeyor CI发布到Azure DevOps工件 - How to publish nuget packages from AppVeyor CI to Azure DevOps artifacts 将 NuGet 包从 TeamCity 发布到 Azure DevOps 工件 - Publish NuGet Packages from TeamCity to Azure DevOps Artifacts 如何从私有的 azure devops 提要中恢复 nuget 包? - How to restore nuget packages from a private azure devops feed? 如何配置 Azure DevOps 发布管道以使用来自 Azure Artifacts 的通用包? - How can I configure a Azure DevOps release Pipeline to use Universal Packages from Azure Artifacts?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM