Rename application

N

NickP

Hi there,

I need to be able to change the name of my application through a
pre-compile constant, is this possible?

I want to try to avoid having 2 separate code trees for an application I
am making, there are 2 variants, each with their own unique graphics, name,
colours etc. I can do most of these via pre-compile constants but I have no
idea how I would go about changing the name.

Many thanks in advance!

Nick.
 
N

NickP

Hey there,

I found out how to do it, by editing the assemblyinfo file manually and
putting pre-compile checks to the relevant entries in there.

Nick.
 
N

NickP

Actually, i'm wrong, that was the title, not assembly name, still need to
change this somehow...

Nick.
 
C

Cor Ligthert [MVP]

Nick,

How are you, are you talking about the information that is in the solution
properties to find by right clicking on that? (That treetop in the solution
explorer)

Cor
 
N

NickP

Hi Cor,

I'm very well thankyou, busy, but well :) How are you?

Yeah, if I doubly click on "My Project" and then goto the Application
tab. The first item is "Assembly name", I would like this to change with a
compiler switch, or is this not possible? The assembly isn't used by
anything else so I have considered just renaming it after rebuilding, that
would probably do the same thing anyway.

Thing is I have an application that changes quite allot of bits with a
compiler switch, and the only things left remaining are the Assembly name
and the application icon. I'm not really bothered about the namespace as
the user won't see any of that anyway.

Maybe I should just do a simple macro to make the changes, pre-build, I
guess?

Nick.
 
N

NickP

Wohoo! Found a pretty good fix,

Post build macro...

copy "$(TargetDir)\$(TargetFileName)" "$(TargetDir)\New name.exe"

That way my build process will be seamless without me having to rename
manually. Great stuff!

Nick.
 

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