[Updated again 8/12/04 (yes a bit late)] - added beta 1.
[Update 5/30/04] Versions affected by this bug:

  • VS2002 (all betas and RTM)
  • VS2003 (all betas and RTM)
  • Whidbey PDC bits, VS2005 CTP1, VS2005 CTP2 and also VS2005 Beta 1

Here's to hoping they can fix it.  I know it's not easy (kudos to Paul Vick for admitting that it was a mistake, and thanks for the extensive explanation) - so I'm not sure if they'll have the time. But I still hope.


It's beta 2 of the new visual studio, soon to be VS.Net 2002.  It's awesome, and I'm blown away.  In all ways, I love .net development, and Visual Studio gets better and better.   However, one bug will plague me throughout .net...

Seems like everyone has a strong preference for the language they use in .net (VB.net, c#, or... well, there's really no third I've seen in the real world.)  And since the CLR doesn't care what language you used, it's not a problem.  People should code in the language they are most comfortable in.  So my team-mate and I code away.  He's a VB.Net guy working on some base types, I code in the business logic layer in c# , he does the UI -- VB.Net again.  A quick proof of concept.  Except it won't compile.  We get some error about needing to add a reference to the base type library, when it's already been added.  Ack, what's up? 

After hours of trying things, we make the post... It looks like a beta bug.  Sigh -- we wait until RTM.

VS.NET 2002 is here!!  Yaay -- Oops, bug's not fixed.  A call to PSS confirms it, and they give us the workaround.... set a reference to the compiled binary instead of the project.  Unfortunately this means that sometimes we have to compile the project twice to get it all in sync.  It also causes us to make sure and set all the dependencies manually.  Fine, we do it.

VS.Net 2003 -- Finally, we can stop with this workaround, right?   Wrong.  Bug is still there in all its glory.  Surely they'll fix it in the next big release, though.....

VS.Net codename Whidbey, the PDC bits.  I love it.  So many great improvements coming, but just one minor annoyance.  This damn multi-language bug is still there! Please, Please, Please fix it this time.  I'd love to work on a small team with two languages.  Or change languages in a solution project by project.  Or just use both vb.net and c# in one solution.  Help me, Microsoft!

10 easy steps to reproduce, in any version of Visual Studio.Net.: (that's right, for those that have read ahead -- create three default projects, set references, add 4 lines of code, get error)

  1. Open up a new solution
  2. Create a new VB.Net class library, we'll call it VBBase
  3. Create a new C# class library, we'll call it CSLayer. 
  4. In CSLayer, add a project reference to VBBase
  5. Add a function in Class1 : public void CreateProblem(VBBase.Class1 a){}
  6. Create a new VB.net console application, we'll call it VBFront
  7. In VBFront add project references to VBBase and CSLayer
  8. In Main, Dim a new VBBase.Class1 object and a new CSLayer.Class1 object
  9. Call the CSLayer.Class1 object's CreateProblem passing in your VBBase.Class1 object
  10. Enjoy confusing error message when you try to build.

I've put together the solution that reproduces it for you here.  Warning -- it's extremely simple.  You will probably become very aggravated (as I did) when you realize that it's a bug that impacts anyone trying to take advantage of .net's language-agnosticism that hasn't been fixed for two and a half versions.  Is there anything I can do to help?

[Download sample reproduction - 7KB zip]

[Note to reader] - Although I've called PSS about it and referenced my original case, I've never been given a KB or Q number on this.  Briefly searching for it gave me nothing.  Anyone know the article numbers on this one?