Unable to find reference in VB.net 2005

I have an app that that I have copied from a working example. The example has a reference to Microsoft.VisualBasic.Compatibility which evidently contains a type VB6. When I look in the old app I see the code refers to Microsoft.VisualBasic.Compatibility. The new app will not compile telling me that

Error 1 Name 'VB6' is not declared...

I have a reference to Microsoft.VisualBasic.Compatibility in the new project which I have added and deleted a few times to no avail. (Also tried cleaning and rebuilding the project) Any ideas Is there something else I need to do to make the reference active

BTW I'm using someones else code that I do not want to change so I can't just get rid of the VB6 references.

thanks



Answer this question

Unable to find reference in VB.net 2005

  • mordor_fr

    Goto the properties of the reference 'Microsoft.VisualBasic.Compatibility'. Setting 'Specific Version' to 'False' may solve your problem.

    Happy coding.

  • Joe B

    You may need the statement

    imports Microsoft.VisualBasic.Compatibility

    This will mean that you dont have to type

    dim x as Microsoft.VisualBasic.Compatibility.Vb6.<typeName>

    and can just type

    dim x as Vb6.<typeName>


  • Unable to find reference in VB.net 2005