我有一个类库,我经常需要对其进行调试/逐步升级,然后分发并用作Nuget包以用作Azure DevOps Artifacts提要。
要创建该软件包,请使用nuget.exe v5.4运行以下命令:
library(shiny)
library(shinydashboard)
body <-
dashboardBody(
fluidRow(
numericInput(
inputId = 'status_input',
label = 'numeric input',
value = 50),
textInput(
inputId = 'box_title',
label = 'box title',
value = ''),
uiOutput('my_box')
)
)
server <- function(input, output, session) {
# get box status as string representing html element
box_status <- reactive({
if (input$status_input > 60) {
'box-danger'
} else {
'box-info'
}
})
# get user input for box title
box_title <- reactive({
input$box_title
})
# generate html to display reactive box
output$my_box <- renderUI({
status <- box_status()
title <- box_title()
# generate the dynamic HTML string
HTML(paste0("
'
<div class=\"box box-solid ", status, "\">
<div class=\"box-header\">
<h3 class=\"box-title\">", title, "</h3>
</div>
<div class=\"box-body\">
Box content!
</div>
</div>
'"
))
})
}
shinyApp(ui = dashboardPage(dashboardHeader(), dashboardSidebar(),body), server)
然后我在.nuspec文件中输入数据。然后我运行:
nuget spec
这将在当前工作目录中同时生成nuget软件包文件和snupkg符号文件。
然后我使用VSTS凭据提供程序将其推送到我们的工件提要:
nuget pack myLibrary.csproj -Symbols -SymbolPackageFormat snupkg
这种一般规格,打包,推入方法可以正常工作。
据我了解,只要与this文档位于同一目录中,推入.nupkg文件还将随之推入.snupkg符号文件:
您还可以同时推送主要软件包和符号软件包 使用以下命令。 .nupkg和.snupkg文件都需要 存在于当前文件夹中。
nuget push -Source "MyPackageSource" -ApiKey VSTS myLibrary.nupkg
但是,安装软件包后,我无法进入软件包代码。我也看不到软件包安装文件夹中的任何新内容。只是标准的nupkg和dll。如何提高符号并随后安装它们?
答案 0 :(得分:0)
您可以检查日志以确保(日志应该告诉您snupkg是否已推送,就像nupkg文件一样,如果确实已推送)。
我的理解是Azure DevOps不支持snupkg程序包,因此我希望它不会被推送。但是,Azure Pipeline具有内置的"Index Sources & Publish Symbols task",您可以使用它。与其创建符号包,不如直接将其指向您的pdb。