MSBuild doesn't copy StrongName=false dll's referred in a dependent project


  • Hi,

    I am having a project A(main project) referring Project B. Project B is referring 2 DLLS D1(with property strong name=true) and D2(strong name=false). When I publish Project A using MSBuild, I get D1 dll copied over but not D2. Can someone explain me what the issue is please? If there is any other workaround(other than referring D2 in Project A), please let me know.

    I went through the below link and for me, only StrongName=false dlls are not getting copied over.

    Information of D2: Restsharp.dll, Version: 104.4.0

    Framework: .Net 4.5



    Thursday, February 1, 2018 2:59 AM

All replies

  • Hi AdithyaRanganath,

    Thanks for posting here.

    Do you mean that the D2 dll not copy to the bin folder or publish folder of ProjectA?

    Accoring to your description, I have created a main project A, which referring the Project B. Project B is referring Newtonsoft.Json.dll (with property strong name=true). However, when I publish the Project A, Newtonsoft.Json.dll not copy to the bin folder of Project A. So could you please double check if you have referring the D1.dll directly to your main projectA, so that dll be copy to the bin folder?

    If you still want to copy D2.dll to the bin folder of main projectA, how about add a copy task in the build event to the ProjectB/ProjectA to copy that D2.dll to the main project A?

    copy /Y "$(TargetDir)$(ProjectName).dll" "$(DestinatioPath)\$(ProjectName).dll"

    Hope this helps.

    MSDN Community Support Please remember to click Mark as Answer. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    Thursday, February 1, 2018 9:58 AM