0

What I want to do:

Execute some batch file in the pre-build event of a .NET core library.
The batch is located in the project directory, and expects the target path as a parameter.

I have found a way to do this in the context of a project.json file,
But I can not get it to accepts Visual Studio Macros as parameters -
And can not find a single reference as to how this is accomplished.
At the moment, the macros are interpreted as string literals.

What I have:

"scripts": {
                "precompile": 
                [
                    "$(ProjectDir)\\Prebuild.bat $(TargetPath)"
                ]
}
Eyal Perry
  • 2,255
  • 18
  • 26

1 Answers1

1

Use %project:Directory% instead of $(ProjectDir)

FelixSFD
  • 6,052
  • 10
  • 43
  • 117
Egbert Nierop
  • 2,066
  • 1
  • 14
  • 16