Where to define Application.ProductName?

G

Guest

Hello, friends,

In our c#.net 2005 project, I clicked on project property.
At application tab of property page, clicked on Assembly Information...
button,
All boxes were left blank, including Product text box,
Run the app, checked value of Application.ProductName, and there was a value
for this property!

I thought this value was defined in Product text box mentioned above, but,
obviously I was wrong.

Then, where to define Application.ProductName? Thanks a lot.
 
M

Marc Gravell

Application.ProductName looks at (in order, until something non-empty
is found):
* The AssemblyProduct attribute against the entry assembly (i.e. the
exe), if defined; this is usually set in AssemblyInfo.cs as an
[assembly: AssemblyProduct("Some string")] entry, which is what the
IDE is showing you

* The ProductName set in the the exe's file metadata

* The last portion of the namespace of the Type with the entry-point
in the entry-assembly (the Type with the Main() method, in other
words)

* The name of the Type with the entry-point in the entry-assembly

Does that help? First: check for an AssemblyProduct attribute in an
unusual location...

Marc
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top