简体   繁体   English

如何强制将 nuget package 参考 dll 复制到 output 目录?

[英]How to force nuget package reference dlls to be copied to output directory?

I added the System.Memory Nuget Package to my net48 Azure Function V1 project to provide the missing dlls for a referenced netstandard2.0 package. I added the System.Memory Nuget Package to my net48 Azure Function V1 project to provide the missing dlls for a referenced netstandard2.0 package. But as the package is not directly used in my code, the dlls are not copied to the output folder.但是由于我的代码中没有直接使用 package,因此没有将 dll 复制到 output 文件夹中。

How can I force the dlls of the System.Memory package to be copied to the output folder on build?如何在构建时强制将System.Memory package 的 dll 复制到 output 文件夹中? I already tried with <IncludeAssets>all</IncludeAssets> but this only copies the dlls to output folder in some cases (eg rebuild project).我已经尝试过使用<IncludeAssets>all</IncludeAssets>但这只会在某些情况下将 dll 复制到 output 文件夹(例如重建项目)。 But if I run the Azure Function debugger, the dlls are getting deleted again from output folder.但是,如果我运行 Azure Function 调试器,则 dll 将从 output 文件夹中再次删除。

Copy local does not exist for package references: package 引用不存在本地复制: 包引用不存在本地复制

Select the reference in the Solution / Project / References . Select Solution / Project /参考中的References
Right click / Menu / Properties Right click / Menu / Properties

Copy local: True

More:更多的:

  • Check if VS is running as Administrator检查 VS 是否以管理员身份运行
  • Check if your project folder is inside any folder inside Program Files.检查您的项目文件夹是否在 Program Files 内的任何文件夹中。 If it is, move it to other location outside any Program Files folder.如果是,请将其移动到任何 Program Files 文件夹之外的其他位置。
  • Over Project , use Clean and then RebuildProject上,使用Clean然后Rebuild

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

相关问题 NuGet包的从属DLL未复制到输出文件夹 - Dependent DLLs of a NuGet package not copied to output folder 为什么有些 NuGet package dll 被复制到解决方案的 output 目录而有些没有? - Why do some NuGet package dlls get copied to the solution's output directory and some don't? 使nuget包本机依赖项复制到输出目录中 - Make nuget package native dependencies to be copied in output directory 每当我在NetStandard Library Project中使用Nuget包时,是否都必须将DLL从Nuget包复制到输出目录中? - Do I have to copy the DLLs from the Nuget Package to the output directory everytime I use the Nuget Package in NetStandard Library Project ProjectReference 未作为父 NuGet package 的一部分复制到 output - ProjectReference is not copied to output as part of parent NuGet package NuGet中的依赖DLL未复制到客户端的输出目录 - Dependent DLL in NuGet not copied to output directory of client 如何设置NuGet包以将内容文件复制到输出构建目录? - How to setup a NuGet package to copy content files to output build directory? 如何在 .csproj 中引用 NuGet 包 - How to reference NuGet package in .csproj 如何在混淆 DLL 后从 DLL 创建 nuget package - How to create a nuget package from DLLs after obfuscating them 如何将 C# DLL 包装到 Ubuntu 上的 NuGet package? - How can I wrap C# DLLs into a NuGet package on Ubuntu?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM