473,405 Members | 2,354 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

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 30120
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Pablo | last post by:
Hi, I'm creating an AppDomain and creating an instance of a class. This works fine unless I use caching, which I need to use. The exception that I get is of type "System.IO.FileLoadException"...
0
by: karunakar | last post by:
Hi All I am not able to read the class name I want read the particular class name string path = System.Configuration.ConfigurationSettings.AppSettings; string className = path + ".User";...
1
by: Jay | last post by:
I'm installing one of my dlls to the GAC but no matter what attribute I try, the name that shows up in explorer under global assembly name is always just the name of my assembly file. Is there a...
3
by: Michael Bøcker-Larsen | last post by:
Hi I'v been stuck on this problem for ages now. I have found that I'm not the only one with this problem, by looking through the different newsgroups. Hope you can help me! I know there is a...
1
by: Olav Tollefsen | last post by:
I get the included error message when trying to run my ASP.NET application under Windows Server 2003 (with all updates installed). How can I troubleshoot this? Olav File or assembly name...
3
by: Jim | last post by:
Hi, I have an assembly and it's satellite in my GAC. I have referenced the DLLs in my project (from the same location where I added it to the GAC). CopyLocal is set false. When I run the...
4
by: Tiraman | last post by:
Hi, i have some problem to run my dll's (assemblies) on the production server. I have 3 dll's which use each other. Every thing is ok on my local machine where i developed them but when i...
2
by: Andrew Jocelyn | last post by:
Hi I get this error when I change something in the web.config file. When I build the VS projects and load the first web page the application runs fine. If I then make a save the web.config file...
1
by: tony | last post by:
Hello! I just want to find out how the system find the name to set on a assembly User control dll. I have done this. 1. Create a user control - Here the namespace was set by the system to...
7
by: uncle | last post by:
config file that contains lines like... assemblyname|classname|methodname I want to invoke that static method. I found the following examples which make sense... Type theClass =...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.