473,414 Members | 1,757 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

Reference Project or Assembly

I have a solution containing many usercontrol projects.
When I wish to reference a usercontrol in another project I can select
either the project or the assembly.

Does it make a difference which one I select?

Thanks
Nov 21 '05 #1
11 1888
Just Me,
I normally reference the project, allowing VS.NET to work out compile &
setup dependencies for me.

If you reference the assembly, then you need to manually work out the
compile & setup dependencies. You can use "Project - Project Dependencies"
to set the compile dependencies, I believe you need to manually add the
respective assemblies to setup projects.

I've never had any real problems with referencing the project, however I
have seen reports on developers having problems with both methods.

Hope this helps
Jay
" Just Me" <gr****@a-znet.com> wrote in message
news:eU**************@TK2MSFTNGP11.phx.gbl...
I have a solution containing many usercontrol projects.
When I wish to reference a usercontrol in another project I can select
either the project or the assembly.

Does it make a difference which one I select?

Thanks

Nov 21 '05 #2
Yes it does. When you select project it is simply for debugging. When you
do a final compile you should first compile the child project and then
reference the compiled assembly in the parent project.

Dan

" Just Me" <gr****@a-znet.com> wrote in message
news:eU**************@TK2MSFTNGP11.phx.gbl...
I have a solution containing many usercontrol projects.
When I wish to reference a usercontrol in another project I can select
either the project or the assembly.

Does it make a difference which one I select?

Thanks

Nov 21 '05 #3
Thanks, but can you tell me why?
I mean if I select the project for the final compile, what bad thing
happens?

Thanks again

"solex" <so***@nowhere.com> wrote in message
news:Oj**************@TK2MSFTNGP14.phx.gbl...
Yes it does. When you select project it is simply for debugging. When
you
do a final compile you should first compile the child project and then
reference the compiled assembly in the parent project.

Dan

" Just Me" <gr****@a-znet.com> wrote in message
news:eU**************@TK2MSFTNGP11.phx.gbl...
I have a solution containing many usercontrol projects.
When I wish to reference a usercontrol in another project I can select
either the project or the assembly.

Does it make a difference which one I select?

Thanks


Nov 21 '05 #4
You mean, if I reference an assembly, I have to also reference all its
dependencies?

thanks

"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Just Me,
I normally reference the project, allowing VS.NET to work out compile &
setup dependencies for me.

If you reference the assembly, then you need to manually work out the
compile & setup dependencies. You can use "Project - Project Dependencies"
to set the compile dependencies, I believe you need to manually add the
respective assemblies to setup projects.

I've never had any real problems with referencing the project, however I
have seen reports on developers having problems with both methods.

Hope this helps
Jay
" Just Me" <gr****@a-znet.com> wrote in message
news:eU**************@TK2MSFTNGP11.phx.gbl...
I have a solution containing many usercontrol projects.
When I wish to reference a usercontrol in another project I can select
either the project or the assembly.

Does it make a difference which one I select?

Thanks


Nov 21 '05 #5
Dan,
I only reference projects, when I do my final compiles (release builds),
using Build Solution, the child project is compiled first then the parent
project is compiled.

Do you have a documented case where the above does not work? I would be
curious to see it.

Hope this helps
Jay

"solex" <so***@nowhere.com> wrote in message
news:Oj**************@TK2MSFTNGP14.phx.gbl...
Yes it does. When you select project it is simply for debugging. When
you
do a final compile you should first compile the child project and then
reference the compiled assembly in the parent project.

Dan

" Just Me" <gr****@a-znet.com> wrote in message
news:eU**************@TK2MSFTNGP11.phx.gbl...
I have a solution containing many usercontrol projects.
When I wish to reference a usercontrol in another project I can select
either the project or the assembly.

Does it make a difference which one I select?

Thanks


Nov 21 '05 #6
Just Me,
You mean, if I reference an assembly, I have to also reference all its
dependencies? No that is not what my statement is saying!

If you have 2 or more projects in your solution, an executable and one or
more class libraries. And you reference the class library assembly from your
executable. The executable may be built before the class library, causing
build errors. However ever if you use "Project - Project Dependencies" you
can indicate that the executable depends on (requires) the class library,
VS.NET will then build the class library first, then it will build the
executable.

As I stated I normally reference projects, then VS.NET takes care of every
thing (dependencies) for me. In both debug & release (final) builds.
You mean, if I reference an assembly, I have to also reference all its
dependencies? There are cases where you need to reference dependent assemblies/projects.
For example:
- Library1 has BaseClass
- Library2 has DerivedClass that inherits from BaseClass
- Executable3 references Library2 & uses DerivedClass, Exectuable3 also
needs to reference Library1 as VB.NET needs the "definition" for the
BaseClass also. Here Exectuable3 can either reference both assemblies or the
projects.

However this dependent referencing has nothing to do with build order, which
is what my initial comments about Build/Project Dependencies are referring
to.

Hope this helps
Jay
" Just Me" <gr****@a-znet.com> wrote in message
news:uG**************@TK2MSFTNGP14.phx.gbl... You mean, if I reference an assembly, I have to also reference all its
dependencies?

thanks

"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Just Me,
I normally reference the project, allowing VS.NET to work out compile &
setup dependencies for me.

If you reference the assembly, then you need to manually work out the
compile & setup dependencies. You can use "Project - Project
Dependencies" to set the compile dependencies, I believe you need to
manually add the respective assemblies to setup projects.

I've never had any real problems with referencing the project, however I
have seen reports on developers having problems with both methods.

Hope this helps
Jay
" Just Me" <gr****@a-znet.com> wrote in message
news:eU**************@TK2MSFTNGP11.phx.gbl...
I have a solution containing many usercontrol projects.
When I wish to reference a usercontrol in another project I can select
either the project or the assembly.

Does it make a difference which one I select?

Thanks



Nov 21 '05 #7
Thanks a lot.
I've got it now.

"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message
news:e%****************@TK2MSFTNGP14.phx.gbl...
Just Me,
You mean, if I reference an assembly, I have to also reference all its
dependencies?

No that is not what my statement is saying!

If you have 2 or more projects in your solution, an executable and one or
more class libraries. And you reference the class library assembly from
your executable. The executable may be built before the class library,
causing build errors. However ever if you use "Project - Project
Dependencies" you can indicate that the executable depends on (requires)
the class library, VS.NET will then build the class library first, then it
will build the executable.

As I stated I normally reference projects, then VS.NET takes care of every
thing (dependencies) for me. In both debug & release (final) builds.
You mean, if I reference an assembly, I have to also reference all its
dependencies?

There are cases where you need to reference dependent assemblies/projects.
For example:
- Library1 has BaseClass
- Library2 has DerivedClass that inherits from BaseClass
- Executable3 references Library2 & uses DerivedClass, Exectuable3 also
needs to reference Library1 as VB.NET needs the "definition" for the
BaseClass also. Here Exectuable3 can either reference both assemblies or
the projects.

However this dependent referencing has nothing to do with build order,
which is what my initial comments about Build/Project Dependencies are
referring to.

Hope this helps
Jay
" Just Me" <gr****@a-znet.com> wrote in message
news:uG**************@TK2MSFTNGP14.phx.gbl...
You mean, if I reference an assembly, I have to also reference all its
dependencies?

thanks

"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Just Me,
I normally reference the project, allowing VS.NET to work out compile &
setup dependencies for me.

If you reference the assembly, then you need to manually work out the
compile & setup dependencies. You can use "Project - Project
Dependencies" to set the compile dependencies, I believe you need to
manually add the respective assemblies to setup projects.

I've never had any real problems with referencing the project, however I
have seen reports on developers having problems with both methods.

Hope this helps
Jay
" Just Me" <gr****@a-znet.com> wrote in message
news:eU**************@TK2MSFTNGP11.phx.gbl...
I have a solution containing many usercontrol projects.
When I wish to reference a usercontrol in another project I can select
either the project or the assembly.

Does it make a difference which one I select?

Thanks



Nov 21 '05 #8
Jay,

I do not have documentation. It was my understanding that this was an
accepted method. I generally compile my components outside of the solution
and therefore need to reference the assembly. This way I do not inadverntly
recompile the component if there are no changes, which can cause problems if
there are other projects that depend on the component.

In short my posting was just my convention and apologize for any
misunderstanding.

Regards,
Dan
"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message
news:OP**************@TK2MSFTNGP10.phx.gbl...
Dan,
I only reference projects, when I do my final compiles (release builds),
using Build Solution, the child project is compiled first then the parent
project is compiled.

Do you have a documented case where the above does not work? I would be
curious to see it.

Hope this helps
Jay

"solex" <so***@nowhere.com> wrote in message
news:Oj**************@TK2MSFTNGP14.phx.gbl...
Yes it does. When you select project it is simply for debugging. When
you
do a final compile you should first compile the child project and then
reference the compiled assembly in the parent project.

Dan

" Just Me" <gr****@a-znet.com> wrote in message
news:eU**************@TK2MSFTNGP11.phx.gbl...
I have a solution containing many usercontrol projects.
When I wish to reference a usercontrol in another project I can select
either the project or the assembly.

Does it make a difference which one I select?

Thanks



Nov 21 '05 #9
Dan,
For projects that are shared across solutions, that may be a good
convention.

I currently do not share projects across solutions, so I have not "crossed
that bridge yet".

I can see potential problems for projects destined for the GAC where this
may be an issue, however for shared projects that are destined for side by
side deployment I don't know if I would worry about it. As I stated above, I
have not "crossed that bridge yet".

Thanks for the additional info!

Jay
"solex" <so***@nowhere.com> wrote in message
news:Oo**************@TK2MSFTNGP11.phx.gbl...
Jay,

I do not have documentation. It was my understanding that this was an
accepted method. I generally compile my components outside of the
solution
and therefore need to reference the assembly. This way I do not
inadverntly
recompile the component if there are no changes, which can cause problems
if
there are other projects that depend on the component.

In short my posting was just my convention and apologize for any
misunderstanding.

Regards,
Dan
"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message
news:OP**************@TK2MSFTNGP10.phx.gbl...
Dan,
I only reference projects, when I do my final compiles (release builds),
using Build Solution, the child project is compiled first then the parent
project is compiled.

Do you have a documented case where the above does not work? I would be
curious to see it.

Hope this helps
Jay

"solex" <so***@nowhere.com> wrote in message
news:Oj**************@TK2MSFTNGP14.phx.gbl...
> Yes it does. When you select project it is simply for debugging. When
> you
> do a final compile you should first compile the child project and then
> reference the compiled assembly in the parent project.
>
> Dan
>
> " Just Me" <gr****@a-znet.com> wrote in message
> news:eU**************@TK2MSFTNGP11.phx.gbl...
>> I have a solution containing many usercontrol projects.
>> When I wish to reference a usercontrol in another project I can select
>> either the project or the assembly.
>>
>> Does it make a difference which one I select?
>>
>>
>>
>> Thanks
>>
>>
>
>



Nov 21 '05 #10
Jay,

The problem I have is that I have shared projects and I do not want to use
the GAC because that will change my deployment stragedy. I really like the
convience of using NTD but your projects must be XCOPY deployable.

Dan
"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message
news:uj**************@TK2MSFTNGP14.phx.gbl...
Dan,
For projects that are shared across solutions, that may be a good
convention.

I currently do not share projects across solutions, so I have not "crossed
that bridge yet".

I can see potential problems for projects destined for the GAC where this
may be an issue, however for shared projects that are destined for side by
side deployment I don't know if I would worry about it. As I stated above, I have not "crossed that bridge yet".

Thanks for the additional info!

Jay
"solex" <so***@nowhere.com> wrote in message
news:Oo**************@TK2MSFTNGP11.phx.gbl...
Jay,

I do not have documentation. It was my understanding that this was an
accepted method. I generally compile my components outside of the
solution
and therefore need to reference the assembly. This way I do not
inadverntly
recompile the component if there are no changes, which can cause problems if
there are other projects that depend on the component.

In short my posting was just my convention and apologize for any
misunderstanding.

Regards,
Dan
"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message news:OP**************@TK2MSFTNGP10.phx.gbl...
Dan,
I only reference projects, when I do my final compiles (release builds), using Build Solution, the child project is compiled first then the parent project is compiled.

Do you have a documented case where the above does not work? I would be
curious to see it.

Hope this helps
Jay

"solex" <so***@nowhere.com> wrote in message
news:Oj**************@TK2MSFTNGP14.phx.gbl...
> Yes it does. When you select project it is simply for debugging. When > you
> do a final compile you should first compile the child project and then > reference the compiled assembly in the parent project.
>
> Dan
>
> " Just Me" <gr****@a-znet.com> wrote in message
> news:eU**************@TK2MSFTNGP11.phx.gbl...
>> I have a solution containing many usercontrol projects.
>> When I wish to reference a usercontrol in another project I can select >> either the project or the assembly.
>>
>> Does it make a difference which one I select?
>>
>>
>>
>> Thanks
>>
>>
>
>



Nov 21 '05 #11
Dan,
I normally use a Setup project to deploy my apps.

When you deploy your apps are you going to a single folder for all EXEs or
does each folder get its own EXE? If each EXE gets its own folder then each
folder will have its own copy of the DLL, so I don't see a versioning issue
per se.

If the DLL goes in the GAC or all the EXEs are in a single folder, then I
can see a versioning issue.

As I stated, I have not "crossed that bridge" yet, never the less, I do
appreciate the info for when I do reach that bridge.

Thanks again
Jay

"solex" <so***@nowhere.com> wrote in message
news:%2***************@TK2MSFTNGP11.phx.gbl...
Jay,

The problem I have is that I have shared projects and I do not want to use
the GAC because that will change my deployment stragedy. I really like
the
convience of using NTD but your projects must be XCOPY deployable.

Dan
"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message
news:uj**************@TK2MSFTNGP14.phx.gbl...
Dan,
For projects that are shared across solutions, that may be a good
convention.

I currently do not share projects across solutions, so I have not
"crossed
that bridge yet".

I can see potential problems for projects destined for the GAC where this
may be an issue, however for shared projects that are destined for side
by
side deployment I don't know if I would worry about it. As I stated
above,

I
have not "crossed that bridge yet".

Thanks for the additional info!

Jay
"solex" <so***@nowhere.com> wrote in message
news:Oo**************@TK2MSFTNGP11.phx.gbl...
> Jay,
>
> I do not have documentation. It was my understanding that this was an
> accepted method. I generally compile my components outside of the
> solution
> and therefore need to reference the assembly. This way I do not
> inadverntly
> recompile the component if there are no changes, which can cause problems > if
> there are other projects that depend on the component.
>
> In short my posting was just my convention and apologize for any
> misunderstanding.
>
> Regards,
> Dan
>
>
> "Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message > news:OP**************@TK2MSFTNGP10.phx.gbl...
>> Dan,
>> I only reference projects, when I do my final compiles (release builds), >> using Build Solution, the child project is compiled first then the parent >> project is compiled.
>>
>> Do you have a documented case where the above does not work? I would
>> be
>> curious to see it.
>>
>> Hope this helps
>> Jay
>>
>> "solex" <so***@nowhere.com> wrote in message
>> news:Oj**************@TK2MSFTNGP14.phx.gbl...
>> > Yes it does. When you select project it is simply for debugging. When >> > you
>> > do a final compile you should first compile the child project and then >> > reference the compiled assembly in the parent project.
>> >
>> > Dan
>> >
>> > " Just Me" <gr****@a-znet.com> wrote in message
>> > news:eU**************@TK2MSFTNGP11.phx.gbl...
>> >> I have a solution containing many usercontrol projects.
>> >> When I wish to reference a usercontrol in another project I can select >> >> either the project or the assembly.
>> >>
>> >> Does it make a difference which one I select?
>> >>
>> >>
>> >>
>> >> Thanks
>> >>
>> >>
>> >
>> >
>>
>>
>
>



Nov 21 '05 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Petri J. Riipinen | last post by:
Hi, I'm writing a largish (>60 projects) solution with VS.NET 2003 using VB.NET as my implementation language. I'm using NUnit and NUnit VS.NET-addin to implement unit tests for my code. ...
4
by: WM Chung | last post by:
Hi all, I meet a problem in building my .Net Solution and I would like to seek help. After I have added a dll to reference in one of my project in my solution, when I re-build the solution, I...
5
by: Robert | last post by:
I have a series of web applications (configured as separate applications) on a server. There is a main application at the root and then several virtual directories that are independant...
4
by: John Lafrowda | last post by:
Hi all, I'm trying to handle two projects in one solution (.net 2002, both projects are VB). The first project contains only some public constant definitions (for the moment) and compiles into...
5
by: serge calderara | last post by:
Dear all, I do not see the difference between Referencing an assembliy for use in my project and Register it on a page ? At the end if I want to use assembly functionnality , I need anyway to...
9
by: MSDNAndi | last post by:
Hi, I have the following problem with VS 2005 (Professional) and C# 2.0 I will use assembly and namespace synonymously here. I have a class in namespace InheritClass inherit from a baseclass...
3
by: Richard Lewis Haggard | last post by:
We are having a lot of trouble with problems relating to failures relating to 'The located assembly's manifest definition with name 'xxx' does not match the assembly reference" but none of us here...
4
by: WXS | last post by:
In a case you have Project/Assembly A references Project/Assembly B which References Project/Assembly C. Let's say Project A needs be and references it directly. Unknown to A, B needs project C's...
3
by: ma79ash | last post by:
Language :: VS.NET/ C# The type 'frm_data.frm_data' is defined in an assembly that is not referenced. You must add a reference to assembly I have a Frm_sol solution, which consists on 2...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.