control project's references

Discussion in 'ASP .Net Building Controls' started by TS, Jan 2, 2006.

  1. TS

    TS Guest

    My project that creates the assembly for my custom control references
    assemblies for crystal reports, etc. These get copied with copyLocal false
    (I"m guessing because they exist in the GAC). The hint path in the proj file
    points to the location i referenced from.

    I have had issues with other developers who use the control having problems
    with the references becuase the hint path doesn't point to the correct
    location on their computer

    My questions are

    1. when creating a standalone control, how should i make references to
    external assemblies that it uses? Do i need to set them to copyLocal true?

    2. When the assembly's dll is built, the references that it uses gets
    compiled into that dll, correct???

    thanks
    TS, Jan 2, 2006
    #1
    1. Advertising

  2. Hi TS,

    For the .net application's assembly references, here are some of my
    understanding:

    1. The VS IDE's project assembly reference path is totally separated from
    the runtime searching path of the .net framework CLR, project's reference
    path(hint path or...) is used by IDE to find assembly when doing
    compialtion. At runtime, CLR follows a certain runtime assembly locating
    rule as below:

    #How the Runtime Locates Assemblies
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/htm
    l/cpconhowruntimelocatesassemblies.asp

    2. For copylocal, it is set to false if the referenced assembly is
    strong-named ( for non-strongnamed assembly, it always copy the assembly to
    local with main assembly...), but this dosn't mean that the strong-named
    assembly is automatically installed in GAC, we need to install it manually
    ......

    Also, referenced assemblies are not compiled into the caller assembly(only
    some reference info will be embeded in metadata of main assembly), they're
    separated ones. So at runtime to run our application, we need to make sure
    both the main assembly of our appliation and its referenced assemblies (or
    their further referenced assemblies...) exists in the correct path(clr used
    to locate them....).

    BTW, if you have interests, the "Applied .NET framework programming" and
    "Essential .NET" books have detailed descriptio non assembly identification
    and locating....

    Hope helps. Thanks,

    Steven Cheng
    Microsoft Online Support

    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)






    --------------------
    | From: "TS" <>
    | Subject: control project's references
    | Date: Mon, 2 Jan 2006 16:31:22 -0600
    | Lines: 20
    | X-Priority: 3
    | X-MSMail-Priority: Normal
    | X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
    | X-RFC2646: Format=Flowed; Original
    | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
    | Message-ID: <#nguow#>
    | Newsgroups: microsoft.public.dotnet.framework.aspnet.buildingcontrols
    | NNTP-Posting-Host: 101nat080.tea.state.tx.us 198.214.101.80
    | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP14.phx.gbl
    | Xref: TK2MSFTNGXA02.phx.gbl
    microsoft.public.dotnet.framework.aspnet.buildingcontrols:14206
    | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.buildingcontrols
    |
    | My project that creates the assembly for my custom control references
    | assemblies for crystal reports, etc. These get copied with copyLocal
    false
    | (I"m guessing because they exist in the GAC). The hint path in the proj
    file
    | points to the location i referenced from.
    |
    | I have had issues with other developers who use the control having
    problems
    | with the references becuase the hint path doesn't point to the correct
    | location on their computer
    |
    | My questions are
    |
    | 1. when creating a standalone control, how should i make references to
    | external assemblies that it uses? Do i need to set them to copyLocal true?
    |
    | 2. When the assembly's dll is built, the references that it uses gets
    | compiled into that dll, correct???
    |
    | thanks
    |
    |
    |
    Steven Cheng[MSFT], Jan 3, 2006
    #2
    1. Advertising

  3. Hi TS,

    Does my last reply helps you a little? If there're anything else we can
    help, please feel free to post here.

    Regards,

    Steven Cheng
    Microsoft Online Support

    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)
    --------------------
    | X-Tomcat-ID: 111105750
    | References: <#nguow#>
    | MIME-Version: 1.0
    | Content-Type: text/plain
    | Content-Transfer-Encoding: 7bit
    | From: (Steven Cheng[MSFT])
    | Organization: Microsoft
    | Date: Tue, 03 Jan 2006 03:52:35 GMT
    | Subject: RE: control project's references
    | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.buildingcontrols
    | Message-ID: <>
    | Newsgroups: microsoft.public.dotnet.framework.aspnet.buildingcontrols
    | Lines: 82
    | Path: TK2MSFTNGXA02.phx.gbl
    | Xref: TK2MSFTNGXA02.phx.gbl
    microsoft.public.dotnet.framework.aspnet.buildingcontrols:14207
    | NNTP-Posting-Host: TOMCATIMPORT1 10.201.218.122
    |
    | Hi TS,
    |
    | For the .net application's assembly references, here are some of my
    | understanding:
    |
    | 1. The VS IDE's project assembly reference path is totally separated from
    | the runtime searching path of the .net framework CLR, project's reference
    | path(hint path or...) is used by IDE to find assembly when doing
    | compialtion. At runtime, CLR follows a certain runtime assembly locating
    | rule as below:
    |
    | #How the Runtime Locates Assemblies
    |
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/htm
    | l/cpconhowruntimelocatesassemblies.asp
    |
    | 2. For copylocal, it is set to false if the referenced assembly is
    | strong-named ( for non-strongnamed assembly, it always copy the assembly
    to
    | local with main assembly...), but this dosn't mean that the strong-named
    | assembly is automatically installed in GAC, we need to install it
    manually
    | .....
    |
    | Also, referenced assemblies are not compiled into the caller
    assembly(only
    | some reference info will be embeded in metadata of main assembly),
    they're
    | separated ones. So at runtime to run our application, we need to make
    sure
    | both the main assembly of our appliation and its referenced assemblies
    (or
    | their further referenced assemblies...) exists in the correct path(clr
    used
    | to locate them....).
    |
    | BTW, if you have interests, the "Applied .NET framework programming" and
    | "Essential .NET" books have detailed descriptio non assembly
    identification
    | and locating....
    |
    | Hope helps. Thanks,
    |
    | Steven Cheng
    | Microsoft Online Support
    |
    | Get Secure! www.microsoft.com/security
    | (This posting is provided "AS IS", with no warranties, and confers no
    | rights.)
    |
    |
    |
    |
    |
    |
    | --------------------
    | | From: "TS" <>
    | | Subject: control project's references
    | | Date: Mon, 2 Jan 2006 16:31:22 -0600
    | | Lines: 20
    | | X-Priority: 3
    | | X-MSMail-Priority: Normal
    | | X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
    | | X-RFC2646: Format=Flowed; Original
    | | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
    | | Message-ID: <#nguow#>
    | | Newsgroups: microsoft.public.dotnet.framework.aspnet.buildingcontrols
    | | NNTP-Posting-Host: 101nat080.tea.state.tx.us 198.214.101.80
    | | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP14.phx.gbl
    | | Xref: TK2MSFTNGXA02.phx.gbl
    | microsoft.public.dotnet.framework.aspnet.buildingcontrols:14206
    | | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.buildingcontrols
    | |
    | | My project that creates the assembly for my custom control references
    | | assemblies for crystal reports, etc. These get copied with copyLocal
    | false
    | | (I"m guessing because they exist in the GAC). The hint path in the proj
    | file
    | | points to the location i referenced from.
    | |
    | | I have had issues with other developers who use the control having
    | problems
    | | with the references becuase the hint path doesn't point to the correct
    | | location on their computer
    | |
    | | My questions are
    | |
    | | 1. when creating a standalone control, how should i make references to
    | | external assemblies that it uses? Do i need to set them to copyLocal
    true?
    | |
    | | 2. When the assembly's dll is built, the references that it uses gets
    | | compiled into that dll, correct???
    | |
    | | thanks
    | |
    | |
    | |
    |
    |
    Steven Cheng[MSFT], Jan 5, 2006
    #3
  4. TS

    TS Guest

    it all looks good...thanks steven
    "Steven Cheng[MSFT]" <> wrote in message
    news:...
    > Hi TS,
    >
    > Does my last reply helps you a little? If there're anything else we can
    > help, please feel free to post here.
    >
    > Regards,
    >
    > Steven Cheng
    > Microsoft Online Support
    >
    > Get Secure! www.microsoft.com/security
    > (This posting is provided "AS IS", with no warranties, and confers no
    > rights.)
    > --------------------
    > | X-Tomcat-ID: 111105750
    > | References: <#nguow#>
    > | MIME-Version: 1.0
    > | Content-Type: text/plain
    > | Content-Transfer-Encoding: 7bit
    > | From: (Steven Cheng[MSFT])
    > | Organization: Microsoft
    > | Date: Tue, 03 Jan 2006 03:52:35 GMT
    > | Subject: RE: control project's references
    > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.buildingcontrols
    > | Message-ID: <>
    > | Newsgroups: microsoft.public.dotnet.framework.aspnet.buildingcontrols
    > | Lines: 82
    > | Path: TK2MSFTNGXA02.phx.gbl
    > | Xref: TK2MSFTNGXA02.phx.gbl
    > microsoft.public.dotnet.framework.aspnet.buildingcontrols:14207
    > | NNTP-Posting-Host: TOMCATIMPORT1 10.201.218.122
    > |
    > | Hi TS,
    > |
    > | For the .net application's assembly references, here are some of my
    > | understanding:
    > |
    > | 1. The VS IDE's project assembly reference path is totally separated
    > from
    > | the runtime searching path of the .net framework CLR, project's
    > reference
    > | path(hint path or...) is used by IDE to find assembly when doing
    > | compialtion. At runtime, CLR follows a certain runtime assembly locating
    > | rule as below:
    > |
    > | #How the Runtime Locates Assemblies
    > |
    > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/htm
    > | l/cpconhowruntimelocatesassemblies.asp
    > |
    > | 2. For copylocal, it is set to false if the referenced assembly is
    > | strong-named ( for non-strongnamed assembly, it always copy the assembly
    > to
    > | local with main assembly...), but this dosn't mean that the strong-named
    > | assembly is automatically installed in GAC, we need to install it
    > manually
    > | .....
    > |
    > | Also, referenced assemblies are not compiled into the caller
    > assembly(only
    > | some reference info will be embeded in metadata of main assembly),
    > they're
    > | separated ones. So at runtime to run our application, we need to make
    > sure
    > | both the main assembly of our appliation and its referenced assemblies
    > (or
    > | their further referenced assemblies...) exists in the correct path(clr
    > used
    > | to locate them....).
    > |
    > | BTW, if you have interests, the "Applied .NET framework programming" and
    > | "Essential .NET" books have detailed descriptio non assembly
    > identification
    > | and locating....
    > |
    > | Hope helps. Thanks,
    > |
    > | Steven Cheng
    > | Microsoft Online Support
    > |
    > | Get Secure! www.microsoft.com/security
    > | (This posting is provided "AS IS", with no warranties, and confers no
    > | rights.)
    > |
    > |
    > |
    > |
    > |
    > |
    > | --------------------
    > | | From: "TS" <>
    > | | Subject: control project's references
    > | | Date: Mon, 2 Jan 2006 16:31:22 -0600
    > | | Lines: 20
    > | | X-Priority: 3
    > | | X-MSMail-Priority: Normal
    > | | X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
    > | | X-RFC2646: Format=Flowed; Original
    > | | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
    > | | Message-ID: <#nguow#>
    > | | Newsgroups: microsoft.public.dotnet.framework.aspnet.buildingcontrols
    > | | NNTP-Posting-Host: 101nat080.tea.state.tx.us 198.214.101.80
    > | | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP14.phx.gbl
    > | | Xref: TK2MSFTNGXA02.phx.gbl
    > | microsoft.public.dotnet.framework.aspnet.buildingcontrols:14206
    > | | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.buildingcontrols
    > | |
    > | | My project that creates the assembly for my custom control references
    > | | assemblies for crystal reports, etc. These get copied with copyLocal
    > | false
    > | | (I"m guessing because they exist in the GAC). The hint path in the
    > proj
    > | file
    > | | points to the location i referenced from.
    > | |
    > | | I have had issues with other developers who use the control having
    > | problems
    > | | with the references becuase the hint path doesn't point to the correct
    > | | location on their computer
    > | |
    > | | My questions are
    > | |
    > | | 1. when creating a standalone control, how should i make references to
    > | | external assemblies that it uses? Do i need to set them to copyLocal
    > true?
    > | |
    > | | 2. When the assembly's dll is built, the references that it uses gets
    > | | compiled into that dll, correct???
    > | |
    > | | thanks
    > | |
    > | |
    > | |
    > |
    > |
    >
    TS, Jan 10, 2006
    #4
  5. Thanks for your followup TS,

    Glad that it helps. Have a good day!

    Steven Cheng
    Microsoft Online Support

    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)

    --------------------
    | From: "TS" <>
    | References: <#nguow#>
    <>
    <>
    | Subject: Re: control project's references
    | Date: Tue, 10 Jan 2006 08:45:51 -0600
    | Lines: 141
    | X-Priority: 3
    | X-MSMail-Priority: Normal
    | X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
    | X-RFC2646: Format=Flowed; Original
    | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
    | Message-ID: <>
    | Newsgroups: microsoft.public.dotnet.framework.aspnet.buildingcontrols
    | NNTP-Posting-Host: 101nat080.tea.state.tx.us 198.214.101.80
    | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl
    | Xref: TK2MSFTNGXA02.phx.gbl
    microsoft.public.dotnet.framework.aspnet.buildingcontrols:14257
    | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.buildingcontrols
    |
    | it all looks good...thanks steven
    | "Steven Cheng[MSFT]" <> wrote in message
    | news:...
    | > Hi TS,
    | >
    | > Does my last reply helps you a little? If there're anything else we can
    | > help, please feel free to post here.
    | >
    | > Regards,
    | >
    | > Steven Cheng
    | > Microsoft Online Support
    | >
    | > Get Secure! www.microsoft.com/security
    | > (This posting is provided "AS IS", with no warranties, and confers no
    | > rights.)
    | > --------------------
    | > | X-Tomcat-ID: 111105750
    | > | References: <#nguow#>
    | > | MIME-Version: 1.0
    | > | Content-Type: text/plain
    | > | Content-Transfer-Encoding: 7bit
    | > | From: (Steven Cheng[MSFT])
    | > | Organization: Microsoft
    | > | Date: Tue, 03 Jan 2006 03:52:35 GMT
    | > | Subject: RE: control project's references
    | > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.buildingcontrols
    | > | Message-ID: <>
    | > | Newsgroups: microsoft.public.dotnet.framework.aspnet.buildingcontrols
    | > | Lines: 82
    | > | Path: TK2MSFTNGXA02.phx.gbl
    | > | Xref: TK2MSFTNGXA02.phx.gbl
    | > microsoft.public.dotnet.framework.aspnet.buildingcontrols:14207
    | > | NNTP-Posting-Host: TOMCATIMPORT1 10.201.218.122
    | > |
    | > | Hi TS,
    | > |
    | > | For the .net application's assembly references, here are some of my
    | > | understanding:
    | > |
    | > | 1. The VS IDE's project assembly reference path is totally separated
    | > from
    | > | the runtime searching path of the .net framework CLR, project's
    | > reference
    | > | path(hint path or...) is used by IDE to find assembly when doing
    | > | compialtion. At runtime, CLR follows a certain runtime assembly
    locating
    | > | rule as below:
    | > |
    | > | #How the Runtime Locates Assemblies
    | > |
    | >
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/htm
    | > | l/cpconhowruntimelocatesassemblies.asp
    | > |
    | > | 2. For copylocal, it is set to false if the referenced assembly is
    | > | strong-named ( for non-strongnamed assembly, it always copy the
    assembly
    | > to
    | > | local with main assembly...), but this dosn't mean that the
    strong-named
    | > | assembly is automatically installed in GAC, we need to install it
    | > manually
    | > | .....
    | > |
    | > | Also, referenced assemblies are not compiled into the caller
    | > assembly(only
    | > | some reference info will be embeded in metadata of main assembly),
    | > they're
    | > | separated ones. So at runtime to run our application, we need to make
    | > sure
    | > | both the main assembly of our appliation and its referenced assemblies
    | > (or
    | > | their further referenced assemblies...) exists in the correct path(clr
    | > used
    | > | to locate them....).
    | > |
    | > | BTW, if you have interests, the "Applied .NET framework programming"
    and
    | > | "Essential .NET" books have detailed descriptio non assembly
    | > identification
    | > | and locating....
    | > |
    | > | Hope helps. Thanks,
    | > |
    | > | Steven Cheng
    | > | Microsoft Online Support
    | > |
    | > | Get Secure! www.microsoft.com/security
    | > | (This posting is provided "AS IS", with no warranties, and confers no
    | > | rights.)
    | > |
    | > |
    | > |
    | > |
    | > |
    | > |
    | > | --------------------
    | > | | From: "TS" <>
    | > | | Subject: control project's references
    | > | | Date: Mon, 2 Jan 2006 16:31:22 -0600
    | > | | Lines: 20
    | > | | X-Priority: 3
    | > | | X-MSMail-Priority: Normal
    | > | | X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
    | > | | X-RFC2646: Format=Flowed; Original
    | > | | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
    | > | | Message-ID: <#nguow#>
    | > | | Newsgroups:
    microsoft.public.dotnet.framework.aspnet.buildingcontrols
    | > | | NNTP-Posting-Host: 101nat080.tea.state.tx.us 198.214.101.80
    | > | | Path:
    TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP14.phx.gbl
    | > | | Xref: TK2MSFTNGXA02.phx.gbl
    | > | microsoft.public.dotnet.framework.aspnet.buildingcontrols:14206
    | > | | X-Tomcat-NG:
    microsoft.public.dotnet.framework.aspnet.buildingcontrols
    | > | |
    | > | | My project that creates the assembly for my custom control
    references
    | > | | assemblies for crystal reports, etc. These get copied with copyLocal
    | > | false
    | > | | (I"m guessing because they exist in the GAC). The hint path in the
    | > proj
    | > | file
    | > | | points to the location i referenced from.
    | > | |
    | > | | I have had issues with other developers who use the control having
    | > | problems
    | > | | with the references becuase the hint path doesn't point to the
    correct
    | > | | location on their computer
    | > | |
    | > | | My questions are
    | > | |
    | > | | 1. when creating a standalone control, how should i make references
    to
    | > | | external assemblies that it uses? Do i need to set them to copyLocal
    | > true?
    | > | |
    | > | | 2. When the assembly's dll is built, the references that it uses
    gets
    | > | | compiled into that dll, correct???
    | > | |
    | > | | thanks
    | > | |
    | > | |
    | > | |
    | > |
    | > |
    | >
    |
    |
    |
    Steven Cheng[MSFT], Jan 11, 2006
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Roger Leigh
    Replies:
    8
    Views:
    412
    Karl Heinz Buchegger
    Nov 17, 2003
  2. Replies:
    3
    Views:
    430
    Victor Bazarov
    Nov 10, 2004
  3. DanielEKFA
    Replies:
    8
    Views:
    583
    DanielEKFA
    May 16, 2005
  4. Replies:
    8
    Views:
    692
    Bruno Desthuilliers
    Dec 12, 2006
  5. Alexandre Jaquet
    Replies:
    3
    Views:
    558
    Hendrik Maryns
    Nov 14, 2007
Loading...

Share This Page