PC Review


Reply
Thread Tools Rate Thread

Build order issues?

 
 
Nick
Guest
Posts: n/a
 
      11th Mar 2005
Hi there,

I have a solution which consists of 2 class libraries and 2 executables
which both consume these class libraries. I've set the correct dependencies
in order for the VS to automatically set the build order but I am still
getting issues.

On the first build every project builds in order and I recieve two error
messages briefly at the end of the build which then vanish, the error
messages are basically telling me that a value of type "foobar" cannot be
converted to type "foobar", go figure?

The second build I recieve the same two error messages which vanish, but
then I get another saying that one of my class library dll is in use
elsewhere.

The third build completely breaks everything as the projects consuming
the dll that is in use fail to resolve their dependencies.

Any ideas what is going wrong here?? I'm using VS.NET 2003, all of the
projects in question are VB.NET.

Cheers in advance!

--
Nick Pateman

---------------------------------------------------------------
Any views expressed above are my own
Without predjudice


 
Reply With Quote
 
 
 
 
Nick
Guest
Posts: n/a
 
      11th Mar 2005
Hi again,

My problem appears to be a little deeper than first expected,

[classlibrary A] --> [classlibrary B] --> [application A]
[classlibrary A] --> [classlibrary B] --> [application B]

When compiling application B, I am being told that it cannot type cast
an object for a parameter within a method within classlibrary B. The type
of the object it cannot type case is declared in classlibrary A.

Value of type 'classlibraryA.foobar' cannot be converted to
'classlibraryA.foobar'.
^This error is pointing to an object in classlibrary B.

All I can presume is that the IDE has created 2 different versions of
classlibrary A in order for it to think that the objects are of a different
type. Although this doesn't really make sense because if I examine the
references they check out to all have the correct versions.

Any ideas what's happening? Thanks loads in advance!!!

Nick.

"Nick" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi there,
>
> I have a solution which consists of 2 class libraries and 2 executables
> which both consume these class libraries. I've set the correct
> dependencies in order for the VS to automatically set the build order but
> I am still getting issues.
>
> On the first build every project builds in order and I recieve two
> error messages briefly at the end of the build which then vanish, the
> error messages are basically telling me that a value of type "foobar"
> cannot be converted to type "foobar", go figure?
>
> The second build I recieve the same two error messages which vanish,
> but then I get another saying that one of my class library dll is in use
> elsewhere.
>
> The third build completely breaks everything as the projects consuming
> the dll that is in use fail to resolve their dependencies.
>
> Any ideas what is going wrong here?? I'm using VS.NET 2003, all of the
> projects in question are VB.NET.
>
> Cheers in advance!
>
> --
> Nick Pateman
>
> ---------------------------------------------------------------
> Any views expressed above are my own
> Without predjudice
>



 
Reply With Quote
 
Chris Dunaway
Guest
Posts: n/a
 
      11th Mar 2005
Where is the code for the foobar class? You don't have multiple copies
of that code in your projects do you? Also are your references project
references or are you directly referencing the .dll files? Project
references are preferred. It sounds as if you have multiple copies of
the ClassLibraryA. Also, make sure you don't have any circular
references.

Chris

 
Reply With Quote
 
Nick
Guest
Posts: n/a
 
      11th Mar 2005
Hi there,

> Where is the code for the foobar class? You don't have multiple copies
> of that code in your projects do you? Also are your references project
> references or are you directly referencing the .dll files? Project
> references are preferred. It sounds as if you have multiple copies of
> the ClassLibraryA. Also, make sure you don't have any circular
> references.


This is getting more complex to explain by the moment. It seems to be
when I'm cross referencing (if that's the correct term), for example,

* foobar defined in "class library A"
* "class library B" defines an object "foofoo" which consumes "foobar"
* "application B" defines an object "barfoo" which consumes "foobar".
* When "barfoo"'s "foobar" property is set by a reference to from an
instance of "foofoo" all goes pear shaped.

Confusing?

I don't think I have any circular references, and certainly only one
definition of "foobar".

Nick.


 
Reply With Quote
 
Nick
Guest
Posts: n/a
 
      11th Mar 2005
Right I've fixed it!

I moved the reference of "foobar" from "class library B", and it fixed the
issue!

Nick.

"Nick" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi there,
>
>> Where is the code for the foobar class? You don't have multiple copies
>> of that code in your projects do you? Also are your references project
>> references or are you directly referencing the .dll files? Project
>> references are preferred. It sounds as if you have multiple copies of
>> the ClassLibraryA. Also, make sure you don't have any circular
>> references.

>
> This is getting more complex to explain by the moment. It seems to be
> when I'm cross referencing (if that's the correct term), for example,
>
> * foobar defined in "class library A"
> * "class library B" defines an object "foofoo" which consumes
> "foobar"
> * "application B" defines an object "barfoo" which consumes
> "foobar".
> * When "barfoo"'s "foobar" property is set by a reference to from an
> instance of "foofoo" all goes pear shaped.
>
> Confusing?
>
> I don't think I have any circular references, and certainly only one
> definition of "foobar".
>
> Nick.
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
i seem to be having memory issues, will deplying a release build instead of a debug build help with memory usage of my .net process? Daniel Microsoft ADO .NET 1 19th Sep 2007 05:01 AM
i seem to be having memory issues, will deplying a release build instead of a debug build help with memory usage of my .net process? Daniel Microsoft Dot NET 1 18th Sep 2007 03:45 PM
i seem to be having memory issues, will deplying a release build instead of a debug build help with memory usage of my .net process? Daniel Microsoft Dot NET Framework 2 18th Sep 2007 03:02 PM
i seem to be having memory issues, will deplying a release build instead of a debug build help with memory usage of my .net process? Daniel Microsoft C# .NET 2 18th Sep 2007 10:24 AM
Build an order Arthur Microsoft Access Queries 3 2nd Oct 2003 04:17 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:25 PM.