# Get Compiler Version & Build Config for use in a PostCompile Build action

**URL:** <https://clarionhub.com/t/get-compiler-version-build-config-for-use-in-a-postcompile-build-action/169>\
**Category:** Snippets\
**Created:** [August 22, 2014, 5:50pm UTC](https://clarionhub.com/t/get-compiler-version-build-config-for-use-in-a-postcompile-build-action/169 "2014-08-22T17:50:18Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![brahn](https://clarionhub.com/user_avatar/clarionhub.com/brahn/32/756_2.png) [@brahn](https://clarionhub.com/u/brahn)\
**Post date:** [August 28, 2014, 12:23pm UTC](https://clarionhub.com/t/get-compiler-version-build-config-for-use-in-a-postcompile-build-action/169/3 "2014-08-28T12:23:12Z")

</div>

The BuildConfig is an easy one to get, just use the MSBuild Macro:

`$(Configuration)`

 ![image](https://clarionhub-uploads.s3.dualstack.eu-north-1.amazonaws.com/original/2X/1/15108d4a771ed6e56a4079fa96a74b5492ed165b.png)

There are a whole bunch of others but I can't figure out how to get a proper list.

e.g. try this in the post-build event

```
ECHO "$(SharpDevelopBinPath)" && ECHO "$(Configuration)" && ECHO "$(MSBuildProjectFile)" && ECHO "$(Platform)" && ECHO $(ProjectGuid) && ECHO "$(DefineConstants)" && ECHO "$(ClarionBinPath)" && ECHO Version="$(clarion_version)" && ECHO Model="$(Model)" && ECHO Vid="$(vid)" && ECHO Warnings="$(warnings)" && ECHO CPU="$(cpu)" && ECHO LineNumbers="$(line_numbers)" && ECHO MapFile="$(GenerateMap)" && ECHO CheckStack="$(check_stack)" && ECHO CheckIndex="$(check_index)" && ECHO StackSize="$(stack_size)" && ECHO Defines="$(DefineConstants)" && ECHO Includes="@(Include)" && ECHO References="@(Reference);@(ProjectReference)" && ECHO Sections="$(Configuration)" && ECHO Sources="@(Compile)" && ECHO Libraries="@(Library)" && ECHO FileDrivers="@(FileDriver)" && ECHO Icon="$(ApplicationIcon)" && ECHO TargetName="$(OutputName)" && ECHO TargetDir="$(OutputPath)" && ECHO TargetType="$(OutputType)" && ECHO RedirectionFile="$(RedFile)" && ECHO CopyCoreFiles="$(CopyCore)" && ECHO CopyableFiles="@(None)" && ECHO ConfigDir="$(ConfigDir)" && ECHO ProjectName="$(MSBuildProjectFile)" && ECHO NoDependency="$(NoDependency)" && ECHO Signal="$(Signal)"

```

Which will get you something like this:

```
"C:\Dev\Clarion\C9\bin" 
"Release" 
"ClaEvaluate.cwproj" 
"Win32" 
{DFDAFF8A-8D4A-420A-A28C-D2EAD50BA43F} 
"_ABCDllMode_=>0;_ABCLinkMode_=>2" 
"C:\Dev\Clarion\C9\bin" 
Version="" 
Model="Dll" 
Vid="off" 
Warnings="on"  
CPU="" 
LineNumbers="False" 
MapFile="True" 
CheckStack="False" 
CheckIndex="False" 
StackSize="16384" 
Defines="_ABCDllMode_=>0;_ABCLinkMode_=>2" 
Includes="" 
References=";" 
Sections="Release" 
Sources="ClaEvaluate.clw" 
Libraries="" 
FileDrivers="" 
Icon="appicon.ico" 
TargetName="ClaEvaluate" 
TargetDir="" 
TargetType="WinExe" 
RedirectionFile="" 
CopyCoreFiles="True" 
CopyableFiles="ClaEvaluate.exp" 
ConfigDir="" 
ProjectName="ClaEvaluate.cwproj" 
NoDependency="" 
Signal="ClarionSemc25b4aba-a436-4ff8-9b54-38397785cef4"

```

I think that pretty much anything in your \*.cwproj is available. It looks like there is a "clarion\_version" that gets set somewhere but for whatever reason it is not coming out in the post build. same for "Version" which is a bit of a pain.

---

_[View the full topic](https://clarionhub.com/t/get-compiler-version-build-config-for-use-in-a-postcompile-build-action/169)._
