References in mixed VB and C# solution

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a Windows application comprising 7 projects in the one solution. Two of the projects are in VB and the other 5 in C#. It had been working fine. Today I make some minor changes, and now the VB classess do not recognise most of the C# projects which they referenced. They recognise one only. I did not make any changes that should have caused this, they were just code changes. I have needless to say tried shutting down, re-booting, remove projects and re-instate them, re-make the References in the projects. All to no avail. Can you suggest what else I can try

Thanks in advance
 
Millig said:
I have a Windows application comprising 7 projects in the one
solution. Two of the projects are in VB and the other 5 in C#. It had
been working fine. Today I make some minor changes, and now the VB
classess do not recognise most of the C# projects which they
referenced. They recognise one only. I did not make any changes that
should have caused this, they were just code changes. I have needless
to say tried shutting down, re-booting, remove projects and
re-instatethem, re-make the References in the projects. All to no
avail. Can you suggest what else I can try.

Do all the projects still build? We've seen problems like this where
VS.NET has virtually ignored the fact that one of the projects hasn't
built correctly, and continued to try to build a project that depends
on the one that failed.
 
Yeah, the five C# projects all build successfully. The modification that I had been doing was in the VB project
The .Net Framework that I am using is 1.0 Version 1.0.3705

I noticed a something similar when referring to public enumerations. When I made a change in an enum list in a C# project, a VB project blithely skipped all code lines referencing the enum! I found a workaround by copying the enum to a new one, with a new name, removing the old one and setting the name back to the original! Strange but it worked! The mixing of VB and C# sharp has been great for me to ease the transition to C# but it throws up some funnies
 
Yeah, the five C# projects all build successfully. The modification that I had been doing was in the VB project.
The .Net Framework that I am using is 1.0 Version 1.0.3705.

I noticed a something similar when referring to public enumerations. When I made a change in an enum list in a C# project, a VB project blithely skipped all code lines referencing the enum! I found a workaround by copying the enum to a new one, with a new name, removing the old one and setting the name back to the original! Strange but it worked! The mixing of VB and C# sharp has been great for me to ease the transition to C# but it throws up some funnies!

I suppose you have already done a "Rebuild All" ? This sometimes works
for me when unexpected things like you describe happen.

Jan Roelof
 
One of the things I noticed in our VB/C# mixed applications was with case
sensitivity. Make sure your VB projects are referencing you C# projects and
vise versa with the correct case. VB is not case sensitive, but C# is and
this causes a problem.

Millig said:
I have a Windows application comprising 7 projects in the one solution.
Two of the projects are in VB and the other 5 in C#. It had been working
fine. Today I make some minor changes, and now the VB classess do not
recognise most of the C# projects which they referenced. They recognise one
only. I did not make any changes that should have caused this, they were
just code changes. I have needless to say tried shutting down, re-booting,
remove projects and re-instate them, re-make the References in the projects.
All to no avail. Can you suggest what else I can try.
 
Back
Top