Visual Studio - VB.Net References

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mythran

    #1

    Visual Studio - VB.Net References

    I have web controls installed in the C:\Program Files\Common
    Files\Company.N ame directory and reference them in my VB.Net web project
    using the .Net IDE. I do the same for each web control, but some of my web
    controls display as lowercased. I checked the vbproj file for the web
    project and noticed that the reference stored for some of the files are
    lowercased in the <Reference> section. Why does it not add the file names
    to the project file as they are on the file system? When they are copied to
    the bin directory, they have the correct case in the name...as they are when
    they are compiled before referenced...bu t some of them are and some of them
    aren't referenced with the correct case...what gives? Just an
    annoyance...sor ry if this is posted in the wrong group(s)...don' t know where
    else to post something like this :)

    Thanks,
    Mythran

  • Mike Labosh

    #2
    Re: Visual Studio - VB.Net References

    >I have web controls installed in the C:\Program Files\Common[color=blue]
    >Files\Company. Name directory and reference them in my VB.Net web project
    >using the .Net IDE. I do the same for each web control, but some of my web
    >controls display as lowercased. I checked the vbproj file for the web
    >project and noticed that the reference stored for some of the files are
    >lowercased in the <Reference> section.[/color]

    The uppercase vs lowercase is not controlled by the filename of the DLL. It
    is controlled by the namespaces and classes that are declared within it.

    For example, suppose I make a Class Library project like this

    Namespace foo

    Public Class bar
    ' whatever is in here is irrelevant to this discussion
    End Class

    End Namespace

    Now, I build the Class Library DLL.

    Then I flip over to the Windows Explorer and hit it's bin directory and
    rename the DLL to "FooBar.DLL "

    When I reference it in a client project I will see a lowercase Namespace
    "foo" and a lower case class named "bar", because that's the way they were
    originally declared inside the class library.

    A word of advice -- even though it's an annoyance, if you DO have the source
    code for this class library, be careful and thoughtful about changing the
    case of the declarations in it. This is because languages like C#, J# & C++
    are case sensitive, and if you have client applications in those languages
    that use this library, if you change the case of the namespaces or class
    names and then redeploy, it might break any C# / J# / C++ clients that use
    it.
    --
    Peace & happy computing,

    Mike Labosh, MCSD

    "When you kill a man, you're a murderer.
    Kill many, and you're a conqueror.
    Kill them all and you're a god." -- Dave Mustane


    Comment

    • Mythran

      #3
      Re: Visual Studio - VB.Net References

      Checked all Namespace and class names in the assemblies that are referenced
      as lowercase...all namespace declarations, class names, et cetera are in
      their proper casing...none are lowercase...

      So I did a search in the directory for all files that contain the lowercase
      name....0 hits..the assemblies have the correct casing...anothe r problem
      maybe?

      Mythran

      "Mike Labosh" <mlabosh@hotmai l.com> wrote in message
      news:OsNXpvhuFH A.3756@tk2msftn gp13.phx.gbl...[color=blue][color=green]
      > >I have web controls installed in the C:\Program Files\Common
      > >Files\Company. Name directory and reference them in my VB.Net web project
      > >using the .Net IDE. I do the same for each web control, but some of my
      > >web controls display as lowercased. I checked the vbproj file for the
      > >web project and noticed that the reference stored for some of the files
      > >are lowercased in the <Reference> section.[/color]
      >
      > The uppercase vs lowercase is not controlled by the filename of the DLL.
      > It is controlled by the namespaces and classes that are declared within
      > it.
      >
      > For example, suppose I make a Class Library project like this
      >
      > Namespace foo
      >
      > Public Class bar
      > ' whatever is in here is irrelevant to this discussion
      > End Class
      >
      > End Namespace
      >
      > Now, I build the Class Library DLL.
      >
      > Then I flip over to the Windows Explorer and hit it's bin directory and
      > rename the DLL to "FooBar.DLL "
      >
      > When I reference it in a client project I will see a lowercase Namespace
      > "foo" and a lower case class named "bar", because that's the way they were
      > originally declared inside the class library.
      >
      > A word of advice -- even though it's an annoyance, if you DO have the
      > source code for this class library, be careful and thoughtful about
      > changing the case of the declarations in it. This is because languages
      > like C#, J# & C++ are case sensitive, and if you have client applications
      > in those languages that use this library, if you change the case of the
      > namespaces or class names and then redeploy, it might break any C# / J# /
      > C++ clients that use it.
      > --
      > Peace & happy computing,
      >
      > Mike Labosh, MCSD
      >
      > "When you kill a man, you're a murderer.
      > Kill many, and you're a conqueror.
      > Kill them all and you're a god." -- Dave Mustane
      >[/color]

      Comment

      Working...