Set “Copy Local” to False by default?

前端 未结 6 1786
闹比i
闹比i 2020-12-04 19:48

Can I set the default-option of \"Copy Local\" in Visual Studio to False? In most times, when I add a dll as dependency of a project, I want the Copy Local property set to F

6条回答
  •  一个人的身影
    2020-12-04 20:06

    Starting with msbuild v 15 you can copy a single file called Directory.Build.props in the root folder that contains your source:

    
    
      
        False
      
      
         False
      
    
    
    

    Nothing more to do! This works well with Visual Studio 2017 and also the vNext Build. May you have to close Visual Studio and than open your solution again to take the file effect.

    https://docs.microsoft.com/en-us/visualstudio/msbuild/customize-your-build#directorybuildprops-and-directorybuildtargets

提交回复
热议问题