Can I use an environment variable in Obfuscar config file?

411 Views Asked by At

The obfuscar config file needs to specify "InPath" and "OutPath". Is it possible to use an environment variable? If yes, how?
The reason is that this config file is in SVN and then should be used by people having their projects locally in different locations where the environment variable points to.

e.g.

<Var name="InPath" value="%MYDEVPATH%\Project\bin\Release" />

instead of

<Var name="InPath" value="c:\foo\foo\foo\Project\bin\Release" />

regards,
Tobi

edited: changed $(MYDEVPATH) to %MYDEVPATH%

1

There are 1 best solutions below

1
On BEST ANSWER

It is impossible yet. Obfuscar does not attempt to evaluate environment variables.

I can create a work item to track this request and let you know once it is implemented.

Updated:

Fixed in https://github.com/lextm/obfuscar/commit/97eaa12ac75b2246bba64dd74752caa635ef8f7a

Should be part of vNext.