Results 1 to 21 of 21

Thread: Permanently turn off vb.namespace?

Hybrid View

  1. #1
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Permanently turn off vb.namespace?

    Quote Originally Posted by Merrion
    You can remove the reference to the dll MicrosoftVisualBasic.dll
    How exactly can you do that? There is no reference to that assembly listed in the Solution Explorer. I can add a reference to that assembly to a C# project if I want and see it listed, but I cannot remove one from a VB.NET project, or at least not the conventional way.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  2. #2
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Re: Permanently turn off vb.namespace?

    Quote Originally Posted by jmcilhinney
    How exactly can you do that? There is no reference to that assembly listed in the Solution Explorer. I can add a reference to that assembly to a C# project if I want and see it listed, but I cannot remove one from a VB.NET project, or at least not the conventional way.
    You're not looking in the right place thats why. Its in the Project Properties dialog. Its under "imports" or something and there is a list of namespaces that are loaded regardless of whats in the solution explorer references list.
    I don't live here any more.

  3. #3
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Permanently turn off vb.namespace?

    Quote Originally Posted by wossname
    You're not looking in the right place thats why. Its in the Project Properties dialog. Its under "imports" or something and there is a list of namespaces that are loaded regardless of whats in the solution explorer references list.
    Like I said before, importing a namespace is not the same as referencing an assembly. Importing a namespace just means that you can use members of that namespace in code without qualifying them. If you remove the project-wide import of the Microsoft.VisualBasic namespace you are not prevented from using Runtime functions. It just means that you would have to use, for example, Microsoft.VisualBasic.Interaction.MsgBox in code instead of just MsgBox. You would have to actually remove the reference to the assembly in with the Interaction module is defined. If you add a reference to the Microsoft.VisualBasic.dll assembly to a C# project then you can use MsgBox in C# code. Remove the reference and you can't again, but I'm saying that there is no reference to that assembly visible in a VB.NET project for you to remove, at least not through the IDE anyway.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width