469,281 Members | 2,484 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,281 developers. It's quick & easy.

How can I get Assembly Name?

Tom
Application.ProductName returns the root namespace. How do I get the
assembly name as displayed on the project properties dialog?

Tom
Nov 21 '05 #1
5 29827
System.Reflection.Assembly.GetExecutingAssembly.Ge tName.Name()

hope that helps..
Imran.

"Tom" <no*****@nowhere.none> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Application.ProductName returns the root namespace. How do I get the
assembly name as displayed on the project properties dialog?

Tom

Nov 21 '05 #2
Tom
Yes that helps, but dang that's long (62 characters). I was most of the
way there. You know you're on the right track if it takes more code than
VB6.
Imran Koradia wrote:
System.Reflection.Assembly.GetExecutingAssembly.Ge tName.Name()

hope that helps..
Imran.

"Tom" <no*****@nowhere.none> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Application.ProductName returns the root namespace. How do I get the
assembly name as displayed on the project properties dialog?

Tom


Nov 21 '05 #3
"Tom" <no*****@nowhere.none> schrieb:
Application.ProductName returns the root namespace. How do I get the
assembly name as displayed on the project properties dialog?


\\\
Imports System.Reflection
..
..
..
MsgBox([Assembly].GetEntryAssembly().GetName().Name)
///

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 21 '05 #4
"Tom" <no*****@nowhere.none> wrote in message
news:uu*************@TK2MSFTNGP10.phx.gbl...
Yes that helps, but dang that's long (62 characters). I was most of the
way there. You know you're on the right track if it takes more code than
VB6.


lol...

You can obviously reduce the verbosity by typing an Imports statement:

Imports System.Reflection
[Assembly].GetExecutingAssembly().GetName().Name
so you see - it isn't that bad after all :)

Imran.
Nov 21 '05 #5
Tom,
Herfried & Imran answered your question.

I just wanted to point out that Application.ProductName does not return the
root namespace per se.

It actually returns the value of the AssemblyProductAttribute found in the
AssemblyInfo.vb file of your project. If you leave this attribute its
default value of blank then you do indeed get the root namespace. However if
you change the attribute's value then you will get the new value.

I normally change the AssemblyProductAttribute to a displayable value & use
Application.ProductName as my message box titles.

Note Application.ProductVersion comes from the
AssemblyInformationalVersionAttribute if you add it to your AssemblyInfo.vb
file, if you do not add AssemblyInformationalVersion, the
Application.ProductVersion comes from the AssemblyVersionAttribute:

For example, if my root namespace is "TheGreatAndWonderfulApp", I might set
my AssemblyInfo.vb file as:

....
<Assembly: AssemblyProduct("The Great & Wonderful Application")>
....
<Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyInformationalVersion("1.0")> ' Product Version

Hope this helps
Jay

"Tom" <no*****@nowhere.none> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Application.ProductName returns the root namespace. How do I get the
assembly name as displayed on the project properties dialog?

Tom

Nov 21 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.