简体   繁体   中英

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. But as the package is not directly used in my code, the dlls are not copied to the output folder.

How can I force the dlls of the System.Memory package to be copied to the output folder on build? I already tried with <IncludeAssets>all</IncludeAssets> but this only copies the dlls to output folder in some cases (eg rebuild project). But if I run the Azure Function debugger, the dlls are getting deleted again from output folder.

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

Select the reference in the Solution / Project / References .
Right click / Menu / Properties

Copy local: True

More:

  • Check if VS is running as Administrator
  • Check if your project folder is inside any folder inside Program Files. If it is, move it to other location outside any Program Files folder.
  • Over Project , use Clean and then Rebuild

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM