stryker-net icon indicating copy to clipboard operation
stryker-net copied to clipboard

Add path param for nuget.exe

Open jisperliu opened this issue 6 years ago • 6 comments

Add a parameter and a field in the configuration file to set path to nuget.exe as its required to restore NuGet packages for .net framework projects.

jisperliu avatar Jul 10 '19 19:07 jisperliu

@jisperliu we currently get the path using where.exe. It is able to find the nuget.exe path if it is present in your system path.

If you follow the instructions as stated in their documentation stryker should run fine: https://docs.microsoft.com/en-us/nuget/install-nuget-client-tools#windows

richardwerkman avatar Jul 11 '19 07:07 richardwerkman

@richardwerkman That's exactly the reason I think having a path param can be better. Instead of having one line of command now I have to get directory of nuget.exe, set environment variable in shell, then run stryker.

jisperliu avatar Jul 11 '19 14:07 jisperliu

But if you use a param you need to provide it every single time you run Stryker instead of only set it once. I suppose in ci build scenarios it might make sense to use a param, but as a user it does not make sense. We will discuss it tomorrow and let you know.

On Thu, Jul 11, 2019, 16:19 jisperliu [email protected] wrote:

@richardwerkman https://github.com/richardwerkman That's exactly the reason I think having a path param can be better. Instead of having one line of command now I have to get directory of nuget.exe, set environment variable in shell, then run stryker.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/stryker-mutator/stryker-net/issues/626?email_source=notifications&email_token=AA3N5HBUANYG5MMVK75RFHDP646OFA5CNFSM4H7SOUA2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZW3FKI#issuecomment-510505641, or mute the thread https://github.com/notifications/unsubscribe-auth/AA3N5HFQRYTIPZNQ3MZLWXLP646OFANCNFSM4H7SOUAQ .

rouke-broersma avatar Jul 11 '19 14:07 rouke-broersma

@Mobrockers Yes and we can also use a config file. I'm having the CI mind here but I would think it enables the ability of people who wanna try this without putting their Download folder into PATH

jisperliu avatar Jul 11 '19 14:07 jisperliu

I agree this makes sense for CI scenarios. Could you submit a PR for it? If not I'll get around to this eventually but it's not a top priority.

rouke-broersma avatar Jul 25 '19 04:07 rouke-broersma

I'll make a PR later this week. My current workaround is add nuget path to powershell's $env variable.

jisperliu avatar Jul 25 '19 14:07 jisperliu

Most CI tooling support making tools available in the path as part of the agent configuration. This is not really needed.

rouke-broersma avatar Nov 25 '22 13:11 rouke-broersma