Skip to content

Bootstrapping the SDK form a cmd script is non-trivial today #4530

Closed

Description

@ViktorHofer

To get the full context, see the discussion in dotnet/runtime#672.

We want to provide a helper script dotnet.cmd in the runtime repo root which invokes the right dotnet host is either be the repo local one or the globally installed one depending on the machine state.

We had such a script already under the coreclr subfolder which invokes the powershell function via a /for function which unfortunately swallows all the stdout logging. Also powershell logs exceptions to stdout instead of stderr, e.g. Invoke-WebRequest.

The workaround is to instead write the sdk location to a temporary file inside the InitializeDotNetCli function and then read that file in the cmd script. This is currently implemented via a dotnet.ps1 helper script in the runtime repo pr (https://github.com/dotnet/runtime/pull/672/files#diff-c8c48a6737cdcad71b675d2f98635e84) but the ideal solution would be to bring this upstream into the arcade repo via an optional parameter.

If there are no concerns raised I will submit a PR later today to fix this.

Activity

  1. ViktorHofer commented on Dec 10, 2019

    @ViktorHofer
    MemberAuthor
  2. markwilkie commented on Dec 10, 2019

    @markwilkie
    Contributor

    Seems reasonable in principle. @ViktorHofer - I presume this will continue to be useful for the new runtime repo?

    cc/ @mmitche @tmat

  3. ViktorHofer commented on Dec 10, 2019

    @ViktorHofer
    MemberAuthor

    Yes, this will used by the runtime repo and such helper scripts to invoke dotnet might be useful in several other repos, so this is general goodness.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions