Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / IDE / July 2004

Tip: Looking for answers? Try searching our database.

use VS 7.1 macro results as version resource?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Philipp - 28 Jun 2004 13:47 GMT
hi there,

in VS 7.1 there are various "macros for build commands and properties"
to be used in a project's "properties". those macros include but are
not limited to:
$(ConfigurationName), $(RootNameSpace), $(ProjectName), $(TargetName),
$(WebDeployPath).

i'd like to make use of those macros not only in a project's
particular "property" (i.e. visual studio configuration). for example,
i'd like to use those macros in conjunction with the "version
resource" (versioninfo) of my project:

something like:
BEGIN
 BLOCK "StringFileInfo"
 BEGIN
   BLOCK "080904b0"
   BEGIN
       [...]
       VALUE "Comments", "Built as: $(ConfigurationName)"
       VALUE "FileVersion", "1, 0, 0, 1"
   END
 END
END

in this example the section
 VALUE "Comments", "Built as: $(ConfigurationName)"
should expand to something like:
 VALUE "Comments", "Built as: Unicode Debug Static"

any idea how to accomplish this?

thanks, philipp  (visual studio .NET 2003, C++)
red floyd - 28 Jun 2004 18:24 GMT
> hi there,
>
[quoted text clipped - 30 lines]
>
>  thanks, philipp  (visual studio .NET 2003, C++)

I believe RC uses C-style macros.

On the RC command line add /D CONFIGNAME="$(ConfigurationName)"

       VALUE "Comments", "Built as: " CONFIGNAME

Warning: I'm not an RC guru.
Philipp - 20 Jul 2004 12:21 GMT
> On the RC command line add /D CONFIGNAME="$(ConfigurationName)"
>
>         VALUE "Comments", "Built as: " CONFIGNAME

no success, yet! i don't know where and how to set MYCONFIGNAME for
the RC.
i tried the project's "properties => resources => general =>
preprocessor definitions".
in my example there's one row present, already:
_DEBUG
so i added another one:
MYCONFIGNAME "$(ConfigurationName)"

whenever you add a definition here, it will modify the "resources =>
command line" parameters.

this is what i tried. none of them work. most of them will produce
errors:

* MYCONFIGNAME "$(ConfigurationName)"
  <=> /d "MYCONFIGNAME "Unicode Debug Static""

* MYCONFIGNAME="$(ConfigurationName)"
  <=> /d "MYCONFIGNAME="Unicode Debug Static""

* MYCONFIGNAME \"$(ConfigurationName)\"
  <=> /d "MYCONFIGNAME \"Unicode Debug Static\""

* MYCONFIGNAME=\"$(ConfigurationName)\"
  <=> /d "MYCONFIGNAME=\"Unicode Debug Static\""

* MYCONFIGNAME $(ConfigurationName)
  <=> /d "MYCONFIGNAME Unicode Debug Static"

in conclusion: it's possible to "define" something: see "_DEBUG".

but i don't know how to "define" it AND assign it a value.

philipp

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.