Macro code in preprocessor?

This forum is meant for questions and discussions about the X# language and tools
Post Reply
mindfulvector
Posts: 32
Joined: Tue Jun 24, 2025 1:57 pm
Location: United States

Macro code in preprocessor?

Post by mindfulvector »

I'd like to setup some sort of mechanism so that every time a build is done of my XSharp code a small piece of code runs to calculate the number of weeks and days since the project started, to update a build number automatically. I build the command line compiler and via XIDE as well.

I looked through the documentation and didn't see anything that could do this but wonder if I missed something.
User avatar
robert
Posts: 5075
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Re: Macro code in preprocessor?

Post by robert »

Isaac,
If you are building with VS/MdBuild then you can create a build task that generates a file with this info and add that file as Compile Item to the build script.

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
Post Reply