MSBuild doesn't copy references (DLL files) if using project dependencies in solution

前端 未结 19 1329
Happy的楠姐
Happy的楠姐 2020-11-22 07:24

I have four projects in my Visual Studio solution (everyone targeting .NET 3.5) - for my problem only these two are important:

  1. MyBaseProject &
19条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-11-22 08:03

    Referencing assemblies that are not used during build is not the correct practice. You should augment your build file so it will copy the additional files. Either by using a post build event or by updating the property group.

    Some examples can be found in other post

    • MSBuild to copy dynamically generated files as part of project dependency
    • VS2010 How to include files in project, to copy them to build output directory automatically during build or publish

提交回复
热议问题