Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6746853
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:22:18+00:00 2026-05-26T12:22:18+00:00

Why does my Visual Studio show the error: The type or namespace name ‘Compatibility’

  • 0

Why does my Visual Studio show the error:

The type or namespace name ‘Compatibility’ does not exist in the namespace ‘Microsoft.VisualBasic’ (are you missing an assembly reference?)

when I do have Microsoft.VisualBasic.Compatibility component already referenced under the .NET tab of Add Reference dialog box.

My .net knowledge is at very basic level. I did google the issue but couldn’t find relevant solutions. Any help, hint, suggestion, links will be much appreciated.

EDIT

The project is actually an Outlook 2003 add-in in C#.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T12:22:18+00:00Added an answer on May 26, 2026 at 12:22 pm

    You havn’t shown the code that results in the error. However, the Microsoft.VisualBasic.Compatibility assembly only contains a single namespace Microsoft.VisualBasic.Compatibility.VB6. My guess is that you need to include this statement in your code

    using Microsoft.VisualBasic.Compatibility.VB6;
    

    You state that you .NET knowledge is at a very basic level so let me try to clarify a bit.

    Adding a reference to an assembly in your project allows you to instantiate types defined in that assembly and execute code belonging to these types. Simplifying things a bit you can think of the assembly name as the name of the file with the code without the DLL extension. In this case the name of the assembly is Microsoft.VisualBasic.Compatibility.

    To avoid identificer collisions .NET has the concept of a namespace. Namespaces are hierarchical in nature just as internet domain names are. The Microsoft.VisualBasic.Compatibility.VB6 namespace is in the top-level Microsoft namespace with three subordinate namespaces.

    To refer to a type you need to qualify it by using the namespace, e.g the fully qualified name of the ScaleMode enumeration is Microsoft.VisualBasic.Compatibility.VB6.ScaleMode. However, you soon get tired of doing that and most of the time you will import all the types from a namespace by putting an using statement at the start of your source file as shown above. Then you can simply refer to the ScaleMode enumeration in your code.

    The confusing part here is that the assembly name is almost the same as the namespace you need.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an annoying problem. Sometimes Visual Studio does not show option View designer
Does visual studio 2008 support classic asp development? It's been years since I created
Does Visual Studio .NET have a way to toggle word-wrap on and off? I
Does Visual Studio Tools for Office require Office to be installed in order to
Does Visual Studio .NET 2008 come with UISpy? I ask this for for the
Does Visual Studio / Resharper support this? By refactor copy I mean to be
Why does Visual Studio declare new classes as private in C#? I almost always
Why does Visual studio take so long to delete a file from the solution
How does visual studio link files to their corresponding designer.cs files? I have a
With Visual Studio 2010 right around the corner, what does Visual Studio 2008 Professional

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.