久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

如何讓 .NET Core 項目將 NuGet 引用復制到構建輸出

How do I get .NET Core projects to copy NuGet references to the build output?(如何讓 .NET Core 項目將 NuGet 引用復制到構建輸出?)
本文介紹了如何讓 .NET Core 項目將 NuGet 引用復制到構建輸出?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我正在嘗試使用 .NET Core 編寫插件系統,我的要求之一是能夠將插件 DLL 及其依賴項分發給用戶進行安裝.

I'm trying to write a plugin system with .NET Core, and one of my requirements are to be able to distribute the plugin DLL along with its dependencies to the user for install.

但是,我不知道如何將我的 NuGet 依賴項包含為構建工件并將它們輸出到構建文件夾,而不必使用 dotnet publish 作為 hack.有什么方法可以在 .csproj 文件(項目文件)中指定嗎?

However, I can't figure out how to include my NuGet dependencies as a build artifact and have them output to the build folder, without having to use dotnet publish as a hack. Is there some way I can specify this in the .csproj file (project file)?

推薦答案

您可以將其添加到您的 csproj 文件中的 <PropertyGroup> 以強制將 NuGet 程序集復制到構建輸出:p>

You can add this to a <PropertyGroup> inside your csproj file to enforce copying NuGet assemblies to the build output:

<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>

但是,請注意構建輸出 (bin/Release/netcoreapp*/*) 不應該是可移植和可分發的,dotnet publish 的輸出是.但是在您的情況下,將程序集復制到構建輸出對于測試目的可能非常有用.但請注意,您也可以使用 DependencyContext api 來解析作為應用程序依賴關系圖一部分的 DLL 及其位置,而不是枚舉本地目錄.

However, note that the build output (bin/Release/netcoreapp*/*) is not supposed to be portable and distributable, the output of dotnet publish is. But in your case, copying the assemblies to the build output is probably very useful for testing purposes. But note that you could also use the DependencyContext api to resolve the DLLs and their locations that are part of the application's dependency graph instead of enumerating a local directory.

這篇關于如何讓 .NET Core 項目將 NuGet 引用復制到構建輸出?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

Is there a C# library that will perform the Excel NORMINV function?(是否有執行 Excel NORMINV 函數的 C# 庫?)
Select x random elements from a weighted list in C# (without replacement)(從 C# 中的加權列表中選擇 x 個隨機元素(無需替換))
Create a summary description of a schedule given a list of shifts(給定輪班列表,創建時間表的摘要描述)
C# Normal Random Number(C# 普通隨機數)
Standard deviation of generic list?(通用列表的標準偏差?)
AsyncCTP: Creating a class that is IAwaitable(AsyncCTP:創建一個 IAwaitable 的類)
主站蜘蛛池模板: 91激情视频| 亚洲成人蜜桃 | 午夜精品三区 | 国产一区二区三区四区三区四 | 国产日韩91 | 久久精品亚洲国产 | 综合久久色 | 精品欧美| 中文字幕中文字幕 | 亚洲精品一区在线 | 中文字幕在线观看视频网站 | 欧美一区免费 | 我想看一级黄色毛片 | 久久亚洲一区 | 一区观看 | 黄色av一区 | 香蕉视频黄色 | 亚洲精品久久视频 | 91在线视频免费观看 | 成人免费在线视频 | 欧美在线国产精品 | 一区二区久久 | 一区二区在线免费观看 | 一区二区视频 | 亚洲色图综合网 | 亚洲精品一区二区三区中文字幕 | 在线免费看黄 | 一级特黄网站 | 777777777亚洲妇女 | 亚洲精品一区中文字幕乱码 | 五月天激情综合网 | 免费精品久久久久久中文字幕 | 午夜合集| 免费在线毛片 | 一区二区三区高清不卡 | 亚洲性爰 | 国产午夜精品一区二区三区嫩草 | 国产特级毛片 | 精一区二区 | 国产成人精品一区二区三 | 日韩欧美电影在线 |