Error running VB6 to 2005 Upgrade Wizard

I am encountering an error running the VB.NET 2005 Upgrade Wizard. When the wizard completes and attempts to open the converted project I get the message:

Unable to read the project file '(project name).vbproj'. The project file "(path)\(project name).vbproj" was not found.

(I have substituted 'project name' and 'path' above for the actual values.)

When I look in the folder I find the file '(project name).vbproj.vs7.vbproj'. When I try to open this file, the Upgrade Wizard launches again and gives the message:

Operation could not be completed. The project file '(path)\(project name).vbproj.vs7.vbproj' cannot be converted. See the conversion report for details.

The conversion report contains the message:

Error converting project file. Element <Name> does not contain the required attribute "Reference".

However, there is no <Name> element in this file.

In looking at another thread I see that the name '(project name).vbproj.vs7.vbproj' indicates that the wizard tried to upgrade to the 2003 format.

I tried creating a new, basically empty VB6 project and converted it to see if the problem would occur there also, but it converted fine. So I started adding things to that project and eventually discovered that if I add any of the following to my test project, I get the same error.

References:

MSBIND.DLL#Microsoft Data Binding Collection VB 6.0 (SP4)
MSDERUN.DLL#Microsoft Data Environment Instance 1.0 (SP4)
msado15.dll#Microsoft ActiveX Data Objects 2.8 Library

Component:

MSADODC.OCX#Microsoft ADO Data Control 6.0 (OLEDB)

(ADO 2.7 gives the same error. My original project contains over 30 other references and components that don't cause this error.)

If I remove these objects from my project the wizard converts it without error and I can then add the references to the converted project and begin the manual code changes.

While this workaround allows me to convert the project, the wizard produces extra error messages, mostly warnings about being unable to determine the default property of ADO objects. I would like to eliminate these extra messages.

I am running Visual Studio 2005 Team Edition Version 8.0.50727.42.

Has anyone else seen this I would appreciate any help. Thanks!



Answer this question

Error running VB6 to 2005 Upgrade Wizard

  • vkrasner

    Hi John,

    This isn't working for me...

    Where should I lok for this PrimaryInteropAssemblyCodeBase entry

    I can't find it in the registry editor, nor in me references in my project.

    Could you please opint me in the right direction

    /Iversen


  • Dietz

    We have found a bug in the Upgrade tool that is causing this problem. If there is an entry in the registry for a type library that your VB6 project is using called PrimaryInteropAssemblyCodeBase the Upgrade tool will generate an entry in the vbproj file with a blank name. This vbproj file will then fail the last step and not be converted to the final format.

    The work around is to temporarily rename (with care) the PrimaryInteropAssemblyCodeBase entry for the particular typelibary, run the upgrade tool and then rename the registry entry back.



  • John Portnov

    I have found when parsing that form I get a system error about AR Form Extender which is behind the main window so I didn't see it previously.

    The error is:

    AR Form Extender Control

    Run-time error '-2147467262 (80004002)':

    System Error &H80004002 (-2147467262). No such interface supported.


    After oking this the upgrade continues to parse the other forms (some of which do the same thing). I assume this is a problem with a particular control we have used..

    I will certainly try running the code advisor on a few forms at a time.

    Would it be useful for me to send you a copy of the project

    Cheers

    Mike








  • Matrixchyah

    Hi Mike,

    I'm sorry to hear you're running into problems with the upgrade tools.

    It sounds like you have a pretty large project. I have seen the Code Advisor have one problem in the past but that issue was addressed in version 1.1. Which version are you using

    As for the Upgrade Wizard, hanging, are you sure it's not just taking a while to finish the upgrade If you check the task mananger is vbu.exe still running

    John



  • Jassim Rahma

    Yes please send it directly to me and I'll try and help you get to the bottom of this. You can send it to John.Hart@Microsoft.Com.

    thanks



  • Wolfram Menzel

    Hi Stephen,

    The problem is being caused by the Name property in the .vbproj file being blank. I have seen this when the referenced component was not installed on the machine.

    Can you compile and run the VB6 project on your machine



  • Eirian

    My .vsproj file contained the following:

    <Reference
    Name = ""
    Guid = "{00020430-0000-0000-C000-000000000046}"
    Lcid = "0"
    VersionMajor = "2"
    VersionMinor = "0"
    WrapperTool = "primary"
    />

    This Guid identifies stdole32.dll which is included by default as a reference in all VB6 projects.

    I sent my .vsproj file to John and he advised:

    The best solution at this point will be to simply add the stdole32 in the Name field of the vs7.vbproj file. Then open this file with Visual Studio, this will kick off the VS 2003 to VS 2005 upgrade wizard. The side effect of this is it will mistakenly wrap some words that it identifies as keywords in brackets for example [Global] and [Partial]. You will need to open all files, especially the .designer.vb files and remove the brackets prior to opening the corresponding form in the designer.

    I followed this advice and the Conversion Wizard (is this different from the Upgrade Wizard ) opened and converted my project to VS 2005, so this seems to be a viable workaround. I do have other errors but they seem to be the normal kinds of things that the Upgrade Wizard can't handle.

    Thanks again, John.


  • Dallastower

    Hi Mike,

    That is a very large project.

    The Code Advisor is an important step in preparing the VB6 application for upgrade but it will probably not help you get around the issues that you're running into. Having said that you may find if you turn off some of the rules that are running it may be able to parse through the code.

    You mention that the upgrade tool gets to a particular form and hangs. I would suggest trying to take that one form and add it to a new project and upgrade it to see if there maybe something in or on the form that is causing the issue. We have seen in previous versions of the tool (VB 2002,2003) where a very large number of variable or constant declarations for example caused the tool to hang, you may be running into something similar.

    Also if you look in the Event log are there any application errors for VBU.exe

    This may be as simple as the tool is running out of machine resources and the best solution maybe to try and split the project into smaller pieces. You may also find that a big bang upgrade with this large of a project may not be the best solution and that upgrading a piece at a time along with the use of the Interop Forms toolkit (http://msdn2.microsoft.com/en-us/vbasic/bb419144.aspx) may be the best approach.



  • nik.martin

    When I got this message the first thing I did was to search the .vbproj file for a Name property and could not find one. I'm taking a couple days vacation this week so I'm writing from home but I'll be back at work on Thursday and can send you the .vsproj files from both the original project and my test project.

    I have been maintaining this project on this computer for the past six months with no problem compiling and running it. Upon examining the objects that are causing this error I discovered that msbind.dll and msderun.dll were not being used so I removed those references from the project, but the project contains one ADO data control and also uses ADO heavily.

    Since the project doesn't actually use msbind.dll or msderun.dll I can't say whether they are properly installed; however, they, along with msadodc.ocx and ADO 2.7 and ADO 2.8 appear in the References or Components window in VB6 and also in the COM References window in VB.NET 2005. They can be added to the project and, as I said, I know that both ADO and the ADO Data Control are used in my project.

    Please let me know if you would like to see the .vsproj files and I'll send them to you when I'm back at work on Thursday.


  • clint 2

    I have Crystal Reports XI Release 2, sp1 on my desktop. I found this in the registry

    [HKEY_CLASSES_ROOT\TypeLib\{00020430-0000-0000-C000-000000000046}\2.0]
    @="OLE Automation"
    "PrimaryInteropAssemblyCodeBase"="file:///C:/Program Files/Common Files/Business Objects/3.0/managed/stdole.dll"
    "PrimaryInteropAssemblyName"="stdole, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"

    When I deleted the highlighted entry from the registry and re-booted my computer the upgrade wizard worked.

    I don't know if this line is needed by Crystal Reports. I haven't tested Crystal Reports after the registry change but I will forward this information to their support.


  • Crasch

    Here is my experience with converting the VB6 project VB2005 that you may find useful.

    About 3 months ago I set out to modify a VB6 project to enhance it for current users. Before making any changes I decided to try the VB6 to VB2005 upgrade wizard, which worked fine. Recently, with all my modifications in place, I ran this wizard again which resulted in exactly the same problem with the ...vs7.vbproject file that had Name = "" statement described in this exchange.

    Having compared two VB6 projects, the original one and "new and improved", I have noticed that the reference to XML 6.0 had been added along the way. I decided to remove this reference since I did not use any of its methods anyway, and ... presto magico!! I got successful conversion.

    Hope it will help.

    Misha04.


  • Bruce Baker

    Hi - Yes it is a large project. 30Mb or so, 97 forms, 17 modules and a class module

    The upgrade wizard - its running through the forms, gets to one particular form (actually a very small form) and hangs - I've left it overnight so I'm sure its hung.

    I'm using the latest code advisor download - the readme file says its version 1.1

    Thanks

    Mike



  • Bradley Reynolds

    Thanks Mark,

    I have been trying to reproduce this for some time now without success. You will definetly want to add the entry back after using the Ugprade wizard.

    Thanks again for letting us know what you found it will help us fix the problem.



  • HopeDreamsComeTrue

    When running the project upgrade wizard it just hangs while parsing forms - no error messages

    I tried using the code advisor first and after about an hour this gives error messages (each time it has been a different error) followed by "out of memory" errors. After this the VB6 IDE menus are all unuseable.


  • Error running VB6 to 2005 Upgrade Wizard