I am trying to define custom macros like pretty commonly done in c++ solutions to be used in, but not limited to, build events in .net core.
For example, I would like to extend pre-defined macros such as $(SolutionDir) or $(ProjectDir) into $(MyCustomPath) = $(SolutionDir)\Data. Then in post build event I would like refer to the newly created $(MyCustomPath) such as
dotnet abc.dll MyCustomPath
I have reached the properties page but I have not seen where I can define new ones

I have never done this before, however you can do this
Edit your project file,
<PropertyGroup>
<MYMACRO>Whatever you want here</MYMACRO>
...
</PropertyGroup>
Then in your build events you can call
$(MYMACRO)
To prove it works



If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With