Link to home
Start Free TrialLog in
Avatar of ablesa
ablesa

asked on

How to programmatically figure out the ConfigurationName that the project was built with

I have a windows form project in a solution and when I run that project (whether its via the IDE or running the .exe), I want to be able to know the ConfigurationName that the exe/project was built with.  I've looked everywhere and it seems that I need to use DTE or VSLangProj objects to get this, but I can't figure out how to use them to do what I want to do.

In my MDI, I want to have an if statement similar to this:
If Project.ConfigurationName = "Release" then
     statement 1
     statement 2
End if

can anyone help?
Thanks!
Avatar of Jorge Paulino
Jorge Paulino
Flag of Portugal image

Hi ablesa,

Try this:

My.Application.Info.ProductName

jpaulino
Avatar of ablesa
ablesa

ASKER

thanks, but no....that's the name of my assembly....
Avatar of ablesa

ASKER

no resolution.
ASKER CERTIFIED SOLUTION
Avatar of Joseph2002
Joseph2002
Flag of Italy image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ablesa

ASKER

Thanks, Joseph!