control project's references

T

TS

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
 
S

Steven Cheng[MSFT]

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" <[email protected]>
| 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#[email protected]>
| 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
|
|
|
 
S

Steven Cheng[MSFT]

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#[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain
| Content-Transfer-Encoding: 7bit
| From: (e-mail address removed) (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: <[email protected]>
| 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" <[email protected]>
| | 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#[email protected]>
| | 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
| |
| |
| |
|
|
 
T

TS

it all looks good...thanks steven
Steven Cheng said:
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#[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain
| Content-Transfer-Encoding: 7bit
| From: (e-mail address removed) (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: <[email protected]>
| 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" <[email protected]>
| | 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#[email protected]>
| | 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
| |
| |
| |
|
|
 
S

Steven Cheng[MSFT]

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" <[email protected]>
| References: <#nguow#[email protected]>
<[email protected]>
<[email protected]>
| 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: <[email protected]>
| 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
| | > 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#[email protected]>
| > | MIME-Version: 1.0
| > | Content-Type: text/plain
| > | Content-Transfer-Encoding: 7bit
| > | From: (e-mail address removed) (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: <[email protected]>
| > | 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" <[email protected]>
| > | | 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#[email protected]>
| > | | 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
| > | |
| > | |
| > | |
| > |
| > |
| >
|
|
|
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top