Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DotNet.Cli can not restore projects with ConfigFile option #2082

Closed
ZeekoZhu opened this issue Sep 9, 2018 · 3 comments
Closed

DotNet.Cli can not restore projects with ConfigFile option #2082

ZeekoZhu opened this issue Sep 9, 2018 · 3 comments

Comments

@ZeekoZhu
Copy link

ZeekoZhu commented Sep 9, 2018

Description

DotNet.Cli can not restore projects with ConfigFile option.

Repro steps

  1. Create a target that restore projects with ConfigFile option set:
Target.create "restore:dotnet" (fun _ ->
    !! "**/*.*proj"
    |> Seq.iter (DotNet.restore (fun o -> { o with ConfigFile = Some "./Nuget.Config" }))
)
  1. Run this target

Expected behavior

It should execute dotnet restore "/path/to/xxxx.csproj" --configfile "./Nuget.Config"

Actual behavior

Starting task 'DotNet:restore': /path/to/xxxx.csproj
/usr/bin/dotnet  restore  "/path/to/xxxx.csproj" --configFile "./Nuget.Config"
MSBUILD : error MSB1001: Unknown switch.
Switch: --configFile

Known workarounds

I think it is this line set a wrong argument name for ConfigFile option, so the workaround is using DotNet.exec` instead of `DotNet.restore

Related information

  • Windows 10 Build 17744 AND docker: microsoft/dotnet:2.1-sdk
  • dotnet sdk 2.1.401
  • Version of FAKE 5.5.0
@matthid
Copy link
Member

matthid commented Sep 9, 2018

So the issue is that fake emits --configFile instead of --configfile, correct?

@matthid matthid closed this as completed in 33c028e Sep 9, 2018
@matthid
Copy link
Member

matthid commented Sep 9, 2018

5.6.1 is released and should work

@ZeekoZhu
Copy link
Author

Yes, It works, thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants