none
References With copy local = true are copied when solution is opened.

    Question

  • Hey!

    In my solution I have some web projects that have references to other projects with copy local = true. When I open my solution or load one of those web projects into the solution then all assembly references with copy local = true are copied to the web projects output directory. I'd like that to only happen when I actually build. How can this be done?

    Thank you!

    Monday, February 06, 2017 2:43 PM

All replies

  • Hi JoWi85,

    In my side I could repro your situation, it is run by default. And in my side I have done many settings, but it did not work, unless I set copy local = flase. And before build, then set copy local = true.

    Whether your project is too large that could impact the speed of opening a solution. If not, there is no necessary to disable copy local. If yes, I think you need to set flase for copy local.

    And here is a similar issue about your issue, I suggest you could refer to Sayed Ibrahim Hashimi’s reply, which maybe help you make sense. :)

    http://stackoverflow.com/questions/602765/when-should-copy-local-be-set-to-true-and-when-should-it-not

    Sincerely,

    Oscar


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. 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 MSDNFSF@microsoft.com.

    • Proposed as answer by qing__Moderator Wednesday, February 08, 2017 5:41 AM
    Tuesday, February 07, 2017 6:16 AM
    Moderator
  • One option would be to remove the "copy local = True" and use the Custom Build Event with a "copy" function...

    If you have not used these before have a look at this msdn: https://msdn.microsoft.com/en-us/library/42x5kfw4.aspx and search the syntax for copying a file based on your criteria.

    • Proposed as answer by qing__Moderator Thursday, February 09, 2017 5:42 AM
    Tuesday, February 07, 2017 7:41 AM
  • Hi JoWi85,

    If some replies help you resolved your doubts, please remember to mark it as answer, which could be helpful for others who has the same doubts. Thank you very much.

    Sincerely,

    Oscar


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. 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 MSDNFSF@microsoft.com.



    Tuesday, February 07, 2017 7:44 AM
    Moderator