久久久久久久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 的類)
主站蜘蛛池模板: 亚洲黄色影院 | 他揉捏她两乳不停呻吟动态图 | 中文字幕第7页 | 午夜激情在线观看 | 久久婷婷网 | 狠狠的操| 国产毛片av| 久久久久黄色 | 色交视频| 日韩精品极品视频在线观看免费 | 羞羞网站在线观看 | 闷骚老干部cao个爽 欧美区一区二 | 日本中文在线 | 小镇姑娘国语版在线观看免费 | 一级片日韩| 精品免费在线观看 | 伊人久久精品 | 伊人综合影院 | 狠狠干在线| 91三级视频 | 我要看一级黄色片 | 久久久久久久久国产 | 天天操天天看 | av网页在线观看 | 国产亚洲欧美在线 | 国产吃瓜黑料一区二区 | 亚洲黄色大片 | 91在线观看视频 | 午夜影院黄 | av免费资源 | 亚洲综合一区二区三区 | 玖玖在线观看 | 欧美性色网 | 国产欧美精品一区二区三区 | 亚欧在线观看 | 亚洲精彩视频 | 婷婷六月色 | 午夜视频在线播放 | 九九久久久 | 黄色三级视频在线观看 | 国产欧美日韩一区二区三区 |