Groups | Blog | Home
all groups > vb.net upgrade > october 2004 >

vb.net upgrade : Strange Error


Jay B. Harlow [MVP - Outlook]
10/20/2004 8:35:43 AM
Tym,
In addition to Herfried's comments, are you certain you referenced the
Microsoft.VisualBasic.Compatibility namespace via "Project - Add Reference"?

You can expand the References Node in Solution Explorer to see what
assemblies you have referenced.

Hope this helps
Jay

[quoted text, click to view]

Jay B. Harlow [MVP - Outlook]
10/20/2004 8:38:34 AM
Tym,
Oh! one other thing to check is the Project level imports.

Check to see if Microsoft.VisualBasic.Compatibility is listed under
"Project - Properties - Common Properties - Imports"

You may want to verify all the "Project - Properties" are set the same.

Hope this helps
Jay

[quoted text, click to view]

Jay B. Harlow [MVP - Outlook]
10/20/2004 11:26:36 AM
Tym,
Just realize that both are doing the same thing. That both are correct.

"Project - Properties - Common Properties - Imports" is the same as putting
"Imports Microsoft.VisualBasic.Compatibility" at the top of each source
file.

If you have 15 files in your project, but only 1 or 2 need
Microsoft.VisualBasic.Compatibility, I would probably use Imports in each of
those files, instead of Project Properties.

FWIW: Over time I slowly remove uses of the
Microsoft.VisualBasic.Compatibility namespace changing any Compatibility
constructs with constructs from Microsoft.VisualBasic & the BCL (Base Class
Library or Framework) instead.

As the Compatibility namespace is intended more for upgraded projects,
rather then new development.

Hope this helps
Jay


[quoted text, click to view]

Tym
10/20/2004 12:48:12 PM
I've just downloaded the vb.net version of David Irland's blowfish
algorithm

I used his VB6 versino quite sucessfully for password encryption.

Moved up to vb.net and downlaoded the above. The projext as downloaded
works great!

As with the VB6 version, I copied the modules into my own projext and
run it, to be greeted with errors:

C:\Documents and Settings\Tym\My Documents\Visual Studio Projects\SICS
Control\basBlowfishFns.vb(140): Type 'VB6.FixedLengthString' is not
defined.


I have made sure that my project has the same references as the
downloaded one, but I still can't get the bugger to run!!

HELP!!

It doesn't like the VB6.FicedLengthString(x) dim statement.....

Herfried K. Wagner [MVP]
10/20/2004 2:27:48 PM
"Tym" <no_spam@ictis.net> schrieb:
[quoted text, click to view]

Are you sure you imported the 'Microsoft.VisualBasic.Compatibility'
namespace?

\\\
Imports Microsoft.VisualBasic.Compatibility
..
..
..
///

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Tym
10/20/2004 2:48:52 PM
On Wed, 20 Oct 2004 14:27:48 +0200, "Herfried K. Wagner [MVP]"
[quoted text, click to view]

Yes.

Tried it in serveral locations....

AssembyInfo.vb
from1.vb
mod1.vb


Still no joy...


But.... now I've been tinkering....

I've put at at the top of both modules which refer to it and it seems
to work OK now - thanks...

Is that what I *should* have done?? :-)

Tym
10/20/2004 4:22:34 PM
On Wed, 20 Oct 2004 08:35:43 -0500, "Jay B. Harlow [MVP - Outlook]"
[quoted text, click to view]

Tym
10/20/2004 4:25:38 PM
On Wed, 20 Oct 2004 08:38:34 -0500, "Jay B. Harlow [MVP - Outlook]"
[quoted text, click to view]


BINGO!!

That's the one.... removed the other import statements (see previous
post) and replaced with this one. now works!!

Thanks

Tym
10/20/2004 6:30:40 PM
On Wed, 20 Oct 2004 11:26:36 -0500, "Jay B. Harlow [MVP - Outlook]"
[quoted text, click to view]

Makes sense to me - maight include the import line in the modules that
I need then I can just keep dropping them into the apps I need without
AddThis Social Bookmark Button