473,386 Members | 1,736 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,386 software developers and data experts.

How to force reference update?

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 class libarary. The second one is builds
an executable which has a reference to the assembly of the first project to
retrieve global constant definitions. The whole thing works fine as long as
no definitions are changed in the library project.

In case definitions are changed in the library project, I would expect that
the executable project integrates these changes as it is set to be dependent
on the library project and hence always built as a second step. In reality,
however, the build operation of the executable project does not recognise
changes in the library. At this time, I found only three unsatisfying ways
to force an update of the reference:

a) Remove the reference to the library and re-add the reference.
b) Switch the current state of the "Copy Local" switch of the executable to
the other option: If it is currently set to "True", a modification towards
"False" will update the reference - the same is true when changing from
"False" to "True".
c) Shut down the .net environment and restart it - the reference will be ok
then.

Now, what I'm looking for is a way to automatically update the dependencies
in a solution build process, i.e. references of the second project to the
first one should be updated (at least) when I try to build the second
project. Az the moment it seems to rely on a (local?) assembly cache as long
as do not update the reference manually as described above.

Any ideas?

Best regards,

John

Nov 20 '05 #1
4 3804
John,
I'm trying to handle two projects in one solution (.net 2002, both projects are VB). Does your one project reference the first project, or did you reference the
DLL itself?

I normally reference the project itself in VS.NET then VS.NET works out the
correct dependencies, via "Project - Add Reference - Project".

You can use "Project - Dependencies" in solution explorer to control which
project is dependent on which when you reference the DLL itself. However I
reference projects, so I have not verified this method works as expected.

Hope this helps
Jay

"John Lafrowda" <la*****@laa.com> wrote in message
news:bv**********@news.uni-stuttgart.de... 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 class libarary. The second one is builds an executable which has a reference to the assembly of the first project to retrieve global constant definitions. The whole thing works fine as long as no definitions are changed in the library project.

In case definitions are changed in the library project, I would expect that the executable project integrates these changes as it is set to be dependent on the library project and hence always built as a second step. In reality, however, the build operation of the executable project does not recognise
changes in the library. At this time, I found only three unsatisfying ways
to force an update of the reference:

a) Remove the reference to the library and re-add the reference.
b) Switch the current state of the "Copy Local" switch of the executable to the other option: If it is currently set to "True", a modification towards
"False" will update the reference - the same is true when changing from
"False" to "True".
c) Shut down the .net environment and restart it - the reference will be ok then.

Now, what I'm looking for is a way to automatically update the dependencies in a solution build process, i.e. references of the second project to the
first one should be updated (at least) when I try to build the second
project. Az the moment it seems to rely on a (local?) assembly cache as long as do not update the reference manually as described above.

Any ideas?

Best regards,

John

Nov 20 '05 #2
Thanks Jay,

referencing the project instead of the DLL solved the problem (although I
still do not understand why referencing the DLL didn't work since the
references were correctly set in the solution explorer).

Cheers,

John
"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> schrieb im
Newsbeitrag news:ux*************@TK2MSFTNGP11.phx.gbl...
John,
I'm trying to handle two projects in one solution (.net 2002, both projects
are VB).

Does your one project reference the first project, or did you reference

the DLL itself?

I normally reference the project itself in VS.NET then VS.NET works out the correct dependencies, via "Project - Add Reference - Project".

You can use "Project - Dependencies" in solution explorer to control which
project is dependent on which when you reference the DLL itself. However I
reference projects, so I have not verified this method works as expected.

Hope this helps
Jay

"John Lafrowda" <la*****@laa.com> wrote in message
news:bv**********@news.uni-stuttgart.de...
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 class libarary. The second one is

builds
an executable which has a reference to the assembly of the first project

to
retrieve global constant definitions. The whole thing works fine as long

as
no definitions are changed in the library project.

In case definitions are changed in the library project, I would expect

that
the executable project integrates these changes as it is set to be

dependent
on the library project and hence always built as a second step. In

reality,
however, the build operation of the executable project does not recognise changes in the library. At this time, I found only three unsatisfying ways to force an update of the reference:

a) Remove the reference to the library and re-add the reference.
b) Switch the current state of the "Copy Local" switch of the executable

to
the other option: If it is currently set to "True", a modification towards "False" will update the reference - the same is true when changing from
"False" to "True".
c) Shut down the .net environment and restart it - the reference will be

ok
then.

Now, what I'm looking for is a way to automatically update the

dependencies
in a solution build process, i.e. references of the second project to the first one should be updated (at least) when I try to build the second
project. Az the moment it seems to rely on a (local?) assembly cache as

long
as do not update the reference manually as described above.

Any ideas?

Best regards,

John


Nov 20 '05 #3
John,
(although I
still do not understand why referencing the DLL didn't work since the
references were correctly set in the solution explorer). Were the dependencies also set correctly?

Also I'm not sure that VS.NET bothers checking to see if the DLL changed? I
suspect it is assuming the DLL is external to the solution, hence it
"doesn't change" so there is no reason to check to see if it changes.
However I am only surmising...

Hope this helps
Jay

"John Lafrowda" <la*****@laa.com> wrote in message
news:bv**********@news.uni-stuttgart.de... Thanks Jay,

referencing the project instead of the DLL solved the problem (although I
still do not understand why referencing the DLL didn't work since the
references were correctly set in the solution explorer).

Cheers,

John
"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> schrieb im
Newsbeitrag news:ux*************@TK2MSFTNGP11.phx.gbl...
John,
I'm trying to handle two projects in one solution (.net 2002, both

projects
are VB).

Does your one project reference the first project, or did you reference

the
DLL itself?

I normally reference the project itself in VS.NET then VS.NET works out

the
correct dependencies, via "Project - Add Reference - Project".

You can use "Project - Dependencies" in solution explorer to control which
project is dependent on which when you reference the DLL itself. However I reference projects, so I have not verified this method works as expected.
Hope this helps
Jay

"John Lafrowda" <la*****@laa.com> wrote in message
news:bv**********@news.uni-stuttgart.de...
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 class libarary. The second one is

builds
an executable which has a reference to the assembly of the first project to
retrieve global constant definitions. The whole thing works fine as
long
as
no definitions are changed in the library project.

In case definitions are changed in the library project, I would expect

that
the executable project integrates these changes as it is set to be

dependent
on the library project and hence always built as a second step. In

reality,
however, the build operation of the executable project does not recognise changes in the library. At this time, I found only three unsatisfying ways to force an update of the reference:

a) Remove the reference to the library and re-add the reference.
b) Switch the current state of the "Copy Local" switch of the
executable to
the other option: If it is currently set to "True", a modification towards "False" will update the reference - the same is true when changing
from "False" to "True".
c) Shut down the .net environment and restart it - the reference will

be ok
then.

Now, what I'm looking for is a way to automatically update the

dependencies
in a solution build process, i.e. references of the second project to the first one should be updated (at least) when I try to build the second
project. Az the moment it seems to rely on a (local?) assembly cache

as long
as do not update the reference manually as described above.

Any ideas?

Best regards,

John



Nov 20 '05 #4
"John Lafrowda" <la*****@laa.com> schrieb

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 class
libarary. The second one is builds an executable which has a
reference to the assembly of the first project to retrieve global
constant definitions. The whole thing works fine as long as no
definitions are changed in the library project.


Did you set the reference to the project or to the compiled file? If you set
it to the project (3rd tab in "add reference" dialog), the 2nd project
should always be up-to-date.
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #5

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

Similar topics

2
by: Jonathan Driller | last post by:
I am attempting to block repeat downloads from a site. I need to have a landing page pass a referer to a secured page. I have tried a meta refresh redirect and several Javascript redirect...
9
by: Daniel Kay | last post by:
Hello! I have written two template classes which implement the observerpattern in C++. I hope I manage to desribe the problem I have. template<class T> class Observer { /* ... */ }; ...
17
by: Geoff Cox | last post by:
Hello, Can I use JavaScript to force a maximised window ? Thanks
3
by: buht | last post by:
Hello Everyone, Fairly new to c# here and have a question regarding scrollbars, particularly a vertical scrollbar. It looks like my options are restricted for the textbox scrollbars being...
1
by: Bob | last post by:
I'm asking here because I've posted this question in the crystal newsgroup, waited two weeks, and got zero response. I would be very appreciative if someone could shed some light on this problem...
3
by: Thunder | last post by:
Hi All, I am trying to figure out how/if it is possible to force a user to take an update that has been published? Currently if there is an update available from the publication the user can...
6
by: bryanbabula | last post by:
I have a question about overriding i was wondering if anyone could help me with, or even suggesting a better/different way. I have no idea if this can even be done or not. I was wondering if there...
1
by: =?Utf-8?B?QnJ5YW4=?= | last post by:
Is there a way to force a "traditional" full page postback in AJAX? I have a page with multiple UpdatePanels and I usually call UpdatePanel.Update() to do a partial postback, but I have one...
3
by: Andy_Khosravi | last post by:
I have a method in place in my application to force users out. It's a simple tactic I got from these newsgroups where you create a table with one record called logout, then check that field with a...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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,...

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.