简体   繁体   中英

Visual Studio 2017 Copy too many files when using a .net standard library

I have two projects:

  1. TestStandardLib(based on .Net Standard 2.0, to use in .Net Framework, .Net Core, Xamarin...)
  2. TestMain(based on .Net Framework 4.6, just to test)

if I reference project TestStandardLib in TestMain, the compile result is 100+ files:

TestMain.exe

TestStandardLib.dll

System.Runtime.*.dll

System.Threading.*.dll

...

...

But I think I only need 2 files:

TestMain.exe and TestStandardLib.dll

because I think the .Net Framework 4.6 should have included .net standard relative dll. And I do test that if I delete the other 100+ files, remaining only TestMain.exe and TestStandardLib.dll, it works ok!

How to solve this?

Clear the output folder

Then expand references node, select the assembly, check the properties window.

Copy Local property should be False.

复制本地假

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