简体   繁体   English

每当我在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

I have a NetStandard Library Project which uses a Nuget Package with the dll's in the lib\\netstandard2.0 project. 我有一个NetStandard库项目,它在lib \\ netstandard2.0项目中使用带有dll的Nuget包。 Now, when I build this project the dll's are not copied to the output directory resulting in 现在,当我构建该项目时,dll不会复制到输出目录中,从而导致

Could not load file or assembly 'ProjEntry, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.

Whereas, when I use this Nuget Package in the Net Framework Library project on build it copies all the dll's to the output directory. 而当我在构建的Net Framework库项目中使用此Nuget软件包时,它将所有dll复制到输出目录。

Is there any special setting I need to do the same in NetStandard Library Project. 在NetStandard Library Project中是否需要做任何特殊设置?

Here is my section 这是我的部分

<!--NetStandard-->
<file src ="ProjImpl\bin\Release\netstandard2.0\ProjImpl.dll" target ="lib\netstandard2.0\ProjImpl.dll"/>
<file src="ProjImpl\bin\Release\netstandard2.0\ProjImpl.pdb" target="lib\netstandard2.0\ProjImpl.pdb" />
<file src="ProjEntry\bin\Release\netstandard2.0\ProjEntry.dll" target ="lib\netstandard2.0\ProjEntry.dll"/>
<file src="ProjEntry\bin\Release\netstandard2.0\ProjEntry.pdb" target="lib\netstandard2.0\ProjEntry.pdb" />

Open the references folder in the solution explorer, right click on the reference (eg nuget package) in question and scroll to properties. 在解决方案资源管理器中打开references文件夹,右键单击有问题的引用(例如nuget包),然后滚动到属性。 Then make sure the 'Copy Local' property of the reference to 'True'. 然后,确保对“ True”的引用的“ Copy Local”属性。

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

相关问题 Nuget包将exe内容文件复制到项目输出目录 - Nuget package to copy exe content file to project output directory 将 nuget package 内容文件(类型为.exe)复制到使用该 nuget package 的项目的 output 目录 - Copy nuget package content file (of type .exe) to output directory of project using that nuget package .NETStandard库nuget软件包-无法安装在标准项目上 - .NETStandard Library nuget package - cannot install on standard project 如何强制将 nuget package 参考 dll 复制到 output 目录? - How to force nuget package reference dlls to be copied to output directory? 如何复制NuGet软件包的本机库文件? - How can I copy the NuGet package native library files? 为什么有些 NuGet package dll 被复制到解决方案的 output 目录而有些没有? - Why do some NuGet package dlls get copied to the solution's output directory and some don't? NuGet包的从属DLL未复制到输出文件夹 - Dependent DLLs of a NuGet package not copied to output folder 从.Net Standard项目和本机dll创建nuget包 - Create a nuget package from .Net Standard project and Native dlls 如何创建.netstandard nuget包? - How to create .netstandard nuget package? 如何在我的新 CSPROJ 类库中包含带有本机 dll 的 NuGet 包? - How can I include a NuGet package with native dlls in my new CSPROJ Class Library?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM