locked
Can't change flag in project preferences

    Question

  • I want to copy libs from references.I go to Properties->Common Properties->References. Then I change flag Copy Local on my reference to "TRUE" value.Click "Apply".And window blinks,and this flag "FALSE" again :(

    What is wrong?


    Saturday, October 26, 2013 4:01 PM

Answers

  • Hi Dmitriy Safonov,

    Welcome to MSDN forum!

    At run time, components must be either in the output path of the project or in the Global Assembly Cache (GAC). If the project contains a reference to an object that is not in one of these locations, you must copy the reference to the output path of the project when you build the project. The CopyLocal property indicates whether this copy has to be made. If the value is True, the reference is copied to the project directory when you build the project. If the value is False, the reference is not copied.

    If you deploy an application that contains a reference to a custom component that is registered in the GAC, the component will not be deployed with the application, regardless of the CopyLocal setting. In earlier versions of Visual Studio, you could set the CopyLocal property on a reference to ensure that the assembly was deployed. Now, you must manually add the assembly to the \Bin folder. This puts all custom code under scrutiny, reducing the risk of publishing custom code with which you are not familiar.

    By default, the CopyLocal property is set to False if the assembly or component is in the global assembly cache or is a framework component. Otherwise, the value is set to True. Project-to-project references are always set to True.

    For more detail info, please see the below article:

    http://msdn.microsoft.com/en-us/library/ez524kew(v=vs.90).aspx


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, October 28, 2013 3:11 AM
    Moderator