Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. References HowTo:

References HowTo:

Scheduled Pinned Locked Moved C#
visual-studioquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    Firoz
    wrote on last edited by
    #1

    Hi, I have two Queries... First:

    Is there any way by which I can Specify (In my Assembly itself) that
    the CopyLocal Property of a Reference to my Assembly should be False?

    ie: Whenever my assembly is added into any Project (References), the CopyLocal property for that Reference should be False by default. Note: It should be possible without making the Assembly Strong Named. And,

    Does the Framework/VisualStudio IDE raise any Event or send any kind of
    Notification to the Assembly when a Reference to it is Added or Removed from a Project.

    ie: I want to execute some code from within my assembly when that Assembly is Added or Removed from the References collection of any Project. Thanks, Firoz

    L 1 Reply Last reply
    0
    • F Firoz

      Hi, I have two Queries... First:

      Is there any way by which I can Specify (In my Assembly itself) that
      the CopyLocal Property of a Reference to my Assembly should be False?

      ie: Whenever my assembly is added into any Project (References), the CopyLocal property for that Reference should be False by default. Note: It should be possible without making the Assembly Strong Named. And,

      Does the Framework/VisualStudio IDE raise any Event or send any kind of
      Notification to the Assembly when a Reference to it is Added or Removed from a Project.

      ie: I want to execute some code from within my assembly when that Assembly is Added or Removed from the References collection of any Project. Thanks, Firoz

      L Offline
      L Offline
      leppie
      wrote on last edited by
      #2

      Firoz wrote: Is there any way by which I can Specify (In my Assembly itself) thatthe CopyLocal Property of a Reference to my Assembly should be False? As far as I know/remember once a project has been saved, that setting should persist when adding it to a new solution, unless the assembly is not available. As for the second question : :( Hope this helps :) MYrc : A .NET IRC client with C# Plugin Capabilities. See http://sourceforge.net/projects/myrc for more info. :-D

      F 1 Reply Last reply
      0
      • L leppie

        Firoz wrote: Is there any way by which I can Specify (In my Assembly itself) thatthe CopyLocal Property of a Reference to my Assembly should be False? As far as I know/remember once a project has been saved, that setting should persist when adding it to a new solution, unless the assembly is not available. As for the second question : :( Hope this helps :) MYrc : A .NET IRC client with C# Plugin Capabilities. See http://sourceforge.net/projects/myrc for more info. :-D

        F Offline
        F Offline
        Firoz
        wrote on last edited by
        #3

        Hi Leppie, Thanks for your Reply. But, thats not the problem. I will explain it in Detail. I have created a simple UserControl. There are some limitations(or you can say Bugs) in this control. One such limitation is that the CopyLocal property of the Reference to this Control should always be FALSE. When this control is added to the References of any project, by default the IDE makes the CopyLocal property of the reference to TRUE. Now, this Control is used by some other developers also. and, I cannot ask or expect those guys to manually change the CopyLocal property from True to FALSE everytime they add my control to their Projects. So, I need a WAY by which the CopyLocal property should be FALSE automatically whenever my Control is added to any Project. Actually, I feel(or wish) there is some simple way to do this. Like some Assembly Arributes which will expose the Value for CopyLocal property and the IDE will read it from the Assembly when it is added to the Reference and set the CopyLocal property accordingly. But, I could not find any such Attribute... Thanks, Firoz

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups