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

Visual Studio bug / limitation

When compiling my solution which contains 15 projects (2 Window Apps, 2
Services, 11 class libraries, C#, MC++, & C++), I was receiving warnings
about symbols defined in multiple places. Selecting Rebuild Solution did
not make the problem go away. After selecting Clean Solution, followed by
Rebuild Solution, the problem went away.

I had always assumed that rebuild meant starting over, recompiling all code,
and linking with the recompiled code. It appears that this is not the case
with Visual Studio .NET 2003.

It looks like the rebuild process doesn't always bother obtaining the latest
versions of dlls, if one already exists in the working directory. If Class
A references Class C, B also references C, and D references both A & B,
Visual Studio sometimes ends up with 2 different versions of class C when
building D.

Hopefully the VS team at Microsoft will take a close look at how the build
and rebuild process copies dlls from one project to another, to prevent this
mixing of old and new versions of dlls in the same assembly.

In the bad old days, I would build all my C++ code into one big exe. .NET
has inspired me to split my code up into many small library dlls which I use
in more then one application. I am developing the libraries at the same
time as the applications which use them, so I need to re-compile several
times a day. Sometimes I waste a lot of time banging my head on the monitor
wondering what is causing all the warnings and errors, in code that
previously compiled without problems.

Bill
Nov 15 '05 #1
4 1824

Hi Bill,

From the link below, you can see that Rebuild Solution will "clean" the
solution first, and then build all project files and components.
"Cleaning" a solution or project deletes any intermediate and output files,
leaving only the project and component files, from which new instances of
the intermediate and output files can then be built.
So I think rebuild solution will indeed do as you want.
http://msdn.microsoft.com/library/de...us/vsintro7/ht
ml/vxtskprepareandmanagebuilds.asp

If you still have this problem, can you show me the steps to reproduce this
problem?

For your dll reference problem, VS.net will copy the project "directly"
referred class's dll into its output directory.
For exmaple, If A refers B project(which generates dll B), while B also
refers C project(which also generates dll C). Then when compile project B,
it will copy dll C to its output directory. But when you compile project A,
it only copies dll B not copy dll C to its output directory.(Because dll C
is not directly referred)

Hope this helps,
Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| From: "Bill Burris" <wb*****@ualberta.ca>
| Subject: Visual Studio bug / limitation
| Date: Fri, 14 Nov 2003 14:45:00 -0700
| Lines: 31
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <uF*************@TK2MSFTNGP10.phx.gbl>
| Newsgroups: microsoft.public.dotnet.languages.csharp
| NNTP-Posting-Host: kzin.phys.ualberta.ca 129.128.162.60
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP10.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:199468
| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
|
| When compiling my solution which contains 15 projects (2 Window Apps, 2
| Services, 11 class libraries, C#, MC++, & C++), I was receiving warnings
| about symbols defined in multiple places. Selecting Rebuild Solution did
| not make the problem go away. After selecting Clean Solution, followed by
| Rebuild Solution, the problem went away.
|
| I had always assumed that rebuild meant starting over, recompiling all
code,
| and linking with the recompiled code. It appears that this is not the
case
| with Visual Studio .NET 2003.
|
| It looks like the rebuild process doesn't always bother obtaining the
latest
| versions of dlls, if one already exists in the working directory. If
Class
| A references Class C, B also references C, and D references both A & B,
| Visual Studio sometimes ends up with 2 different versions of class C when
| building D.
|
| Hopefully the VS team at Microsoft will take a close look at how the build
| and rebuild process copies dlls from one project to another, to prevent
this
| mixing of old and new versions of dlls in the same assembly.
|
| In the bad old days, I would build all my C++ code into one big exe. .NET
| has inspired me to split my code up into many small library dlls which I
use
| in more then one application. I am developing the libraries at the same
| time as the applications which use them, so I need to re-compile several
| times a day. Sometimes I waste a lot of time banging my head on the
monitor
| wondering what is causing all the warnings and errors, in code that
| previously compiled without problems.
|
| Bill
|
|
|

Nov 15 '05 #2

""Jeffrey Tan[MSFT]"" <v-*****@online.microsoft.com> wrote in message
news:ND**************@cpmsftngxa06.phx.gbl...

If you still have this problem, can you show me the steps to reproduce this problem?
Its a little difficult to reproduce the problem. I had a project which was
in another solution. I added it to my soloution, removed all the references
which refered to my dlls, then added references to the corresponding
projects. I then did a rebuild solution. This is when the error with
symbols being defined in multiple places occured. Selecting Clean Solution
followed by Rebuild Solution eliminated the problem. I had assumed that
Rebuild Solution would clean out the old dlls or overwrite them, but it
seems it dosn't work this way.

In my backup files I eliminate all the bin and obj directories to reduce the
size from 130 M down to 2 M, so I don't have the old stuff laying around to
reproduce the problem.

I just have to remember to do a clean before rebuild after merging old
projects into new solutions, since the rebuild command dosn't always do it.

For your dll reference problem, VS.net will copy the project "directly"
referred class's dll into its output directory.
For exmaple, If A refers B project(which generates dll B), while B also
refers C project(which also generates dll C). Then when compile project B,
it will copy dll C to its output directory. But when you compile project A, it only copies dll B not copy dll C to its output directory.(Because dll C
is not directly referred)


In this situation, project A needs a references to project B & project C,
before it will compile. Therefore both dll B & dll C will be copied.

I have got around this problem by defining an interface in project D.
Project B would then reference project D. Project C would reference project
D. Some class in D would implement (inherit) the interface.

This just simplifies creating independent library dlls. The top level exe
which uses these, still needs references to A, B, C, & D.

When B needs to call C and C needs to call back into B, interfaces defined
in a third dll are required to eliminate the circular reference. This was
one of the major sources of problems when converting my C++ to C# and
splitting it up into multiple library dlls. Since then my new C++ code uses
interfaces (abstract base classes). Learning C# has made me a better C++
programmer.

Bill
Nov 15 '05 #3
"Bill Burris" <wb*****@ualberta.ca> wrote in message
news:eY**************@TK2MSFTNGP12.phx.gbl...
For exmaple, If A refers B project(which generates dll B), while B also
refers C project(which also generates dll C). Then when compile project B, it will copy dll C to its output directory. But when you compile project

A,
it only copies dll B not copy dll C to its output directory.(Because dll C is not directly referred)


I hate useing single letters as names, it is usually hard to keep track of
things in my head. Since my last message had errors here is the corrected
version of 2 paragraphs.

In this situation, project A needs references to project B & project C,
before it will compile. Therefore both dll B & dll C will be copied.

I have got around this problem by defining an interface in project D.
Project B would then reference project D. Project C would reference project
D. Some class in project C would implement (inherit) the interface.

Bill

Nov 15 '05 #4

Hi Bill,

Thanks for your feedback.
I have stored this issue in our internal database, we will wait more
detailed community reproduce steps for this issue.
If you met this issue again, then you can contact PSS support at:
http://support.microsoft.com/default.aspx?pr=cntactms
Then, there will be special microsoft engineer working for you. If this
issue is confirmed as our product issue, then this support will be a free
support.
Thanks for your understanding

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| From: "Bill Burris" <wb*****@ualberta.ca>
| References: <uF*************@TK2MSFTNGP10.phx.gbl>
<ND**************@cpmsftngxa06.phx.gbl>
<eY**************@TK2MSFTNGP12.phx.gbl>
| Subject: Re: Visual Studio bug / limitation
| Date: Mon, 17 Nov 2003 11:55:57 -0700
| Lines: 28
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <OW**************@TK2MSFTNGP11.phx.gbl>
| Newsgroups: microsoft.public.dotnet.languages.csharp
| NNTP-Posting-Host: kzin.phys.ualberta.ca 129.128.162.60
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP11.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:199924
| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
|
| "Bill Burris" <wb*****@ualberta.ca> wrote in message
| news:eY**************@TK2MSFTNGP12.phx.gbl...
| >
| > > For exmaple, If A refers B project(which generates dll B), while B
also
| > > refers C project(which also generates dll C). Then when compile
project
| B,
| > > it will copy dll C to its output directory. But when you compile
project
| > A,
| > > it only copies dll B not copy dll C to its output directory.(Because
dll
| C
| > > is not directly referred)
| > >
|
| I hate useing single letters as names, it is usually hard to keep track of
| things in my head. Since my last message had errors here is the corrected
| version of 2 paragraphs.
|
| In this situation, project A needs references to project B & project C,
| before it will compile. Therefore both dll B & dll C will be copied.
|
| I have got around this problem by defining an interface in project D.
| Project B would then reference project D. Project C would reference
project
| D. Some class in project C would implement (inherit) the interface.
|
| Bill
|
|
|
|

Nov 15 '05 #5

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

Similar topics

33
by: John Timbers | last post by:
I'd like to purchase Visual C# .Net for learning purposes only since it's a lot cheaper than Visual Studio (note that I'm a very experienced C++ developer). Can someone simply clarify the basic...
4
by: | last post by:
When do they plan on making this essential utility USEFUL? In its current form its pointless. How could they let this out? Its useless.
6
by: yaron.guez | last post by:
Whenever I create a new windows application from Visual Studio .NET 2003 in either C# or VB.NET upon running the compiled code (debugging or not) I receive a System.NullReferenceException...
10
by: Iain | last post by:
Hi Is it possible to get Visual Studio C# Express (beta 2) connecting to a MySQL database? TIA Iain
81
by: Peter Olcott | last post by:
It looks like System::Collections::Generic.List throws and OUT_OF_MEMORY exception whenever memory allocated exceeds 256 MB. I have 1024 MB on my system so I am not even out of physical RAM, much...
0
by: Fred | last post by:
I am trying to build a consumer to a webservice which use soapheader. I am using Visual Studio 2003. Please see the wsdl-file below. Why is it that the SOAPHEADER is empty when I use it int the...
1
by: Andy Fish | last post by:
Hi, My .Net 2.0 app uses forms authentication, so it redirects to the login page if the user is not logged in. However, if I configure it to use the visual studio development server, the login...
9
by: =?Utf-8?B?RmxhdmVsbGUgQmFsbGVt?= | last post by:
Apparently the Java Conversion tool that used to be in Visual Studio 2005 is no longer supported in Visual Studio 2008. Anyone have any suggestions on how to convert a Java program to C# in Visual...
1
RRick
by: RRick | last post by:
I have a unix C++ project that needs to be converted over to windows visual studio. I'm not sure of the exact version of VS, but it's a recent version, probabIy 2003 or 2005. I would like the...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

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.