System DLLs runtime checking

  • Thread starter Thread starter jon morgan
  • Start date Start date
J

jon morgan

Hi,

I am trying to clean out all the VB specific code in a project before
porting to C#. Having removed all the import references I still see the VB
runtime is loaded at startup. How can I pin down what is actually causing
the VB runtime still to load?

Thanks for any help.


Jon
 
Jon,

You can delete using the project properties the reference too the
Microsoft.VisualBasic namespace in your project what unables you to use
classes from that namespace.

However that namespace is an integrated part of the Framework.

I am curious about your reason for that porting.
A VBNet project is easy to reference in a C# project and visa versa.

Cor
 
Thanks Cor but I've done all this and the run time is still loaded.

I don't understand your comment about it being an integrated part of the
framework - do you mean its' automatically added to any VB project at
runtime even if no code uses VB specific functions and there are no import
references to the runtime ?

I intend porting my apps to C# simply to save my fingers from further
exposure to repetitive strain injury - there's just so much typing with VB
these days. I'm sad moving as I've been programming in basic since the
original Dartmouth Basic and all through VB's 1 to 6. But I guess time has
come to move on unless something really dramatic is afoot for Whidbey/VS
2005.

Regards


Jon
 
Jon,

I hope I understand you well.

The runtime is in the framework, what has to be on all computers what is the
same for C# and VBNet and all .Net programs, only the used code should be in
your exe. To see that you can use ILDASM.exe with the generated exe files.

(It is in one of this directorys of VS)
C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin

That I asked you about why C# was just curiousity for myself. However in my
opinion is there more typing in a C# project than in a VBNet project. While
for the VBNet IDE there is a lot automatic, do you have to do in C# all by
hand. That is the major reason why I find at this moment VBNet nicer.

By instance this

dim dt as new datatable
'the cases are set automaticly right I hate to push every time the shift

is in C#

DataTable dt = new DataTable();
//and don't make a mistake, you can correct that at runtime.

However not important, I was just curious and answered your question.

Cor
 
Cor,

Thanks again for your help - much appreciated.

If you start up the VS IDE, create a new solution, add a new VB windows
application project and run it, the output window does not show the VB
runtime loading. To me that must mean that the VB runtime is not
automatically loaded .

To be clear the output window lists the runtime in my app. as
'c:\windows\assembly\gac\microsoft.visualbasic\7.0.5000.0__b03f5f7f11d50a3a\microsoft.visualbasic.dll'

Sorry to nag you on this but I really would like to nail the point.

Regards

Jon
 
Jon,

Maybe this is easier,
I have created a clean VBNet windows form project did nothing and than build
it in release
I did the same with a C# project

I went to explorer and looked to the size
(That is in the directories program/obj/release)
VB was 6Kb
C# was 16Kb,

When you do that you can run those exe's

In my opinion are you looking at the dll's which are loaded for the building
process

I hope this gives some more idea's

Cor
 
Back
Top