Ash Burlaczenko
Ash Burlaczenko

Reputation: 25475

Cannot build VB6 project referencing .net assembly with a 2 digit version number

We have a legacy VB6 project with references a .net assembly like this, note the 1.9 version number;

Reference=*\G{guid}#1.9#0#C:\path_to_file.tlb#assmembly_name
                    ^^^

Now we're wanting to increment our version number to 1.10 but when updating the reference to;

Reference=*\G{guid}#1.10#0#C:\path_to_file.tlb#assmembly_name

The project will no longer build and we get a compilation error at the line with the Type from this .net assembly is being used.

Has anyone come across this issue before?

Upvotes: 5

Views: 145

Answers (1)

Ash Burlaczenko
Ash Burlaczenko

Reputation: 25475

I couldn't find any documentation to back this up but I've tested it and it works.

The problem here was that we we're putting the version number in the VB project in base10, where it should be base16. So

Reference=*\G{guid}#1.10#0#C:\path_to_file.tlb#assmembly_name

actually tries to load version 1.16. To correct this the reference should be

Reference=*\G{guid}#1.a#0#C:\path_to_file.tlb#assmembly_name

Upvotes: 2

Related Questions