question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support `-noPath` in `InstallDotNet` function

See original GitHub issue
  • This issue is blocking aspnetcore’s merge from preview8: dotnet/aspnetcore#25280
  • This issue is causing unreasonable pain

The dotnet/aspnetcore repo needs the latest runtime for some tests that run in Helix. We prefer to use the InstallDotNet function for this purpose because it supports private runtime feeds and we had too much custom infrastructure around the installation already.

Unfortunately, invoking dotnet-install.ps1 extends the $env:Path default system-wide unless -noPath is on the command line. The InstallDotNet function does not current support including that command-line argument. Please either add a $noPath parameter or (more generally) support the initial $installParameters value as a parameter.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
MattGalcommented, Sep 1, 2020

I discussed this with @dougbu and ended up making the tweak only for the PS1 version of the scripts in the linked PR.

This is specifically for two reasons:

  1. ASP.NET’s actual scenario is needing to call these scripts repeatedly on Helix test machines, not a build scenario
  2. The scripts are only modifying the machine state permanently in the windows case (bash one just calls a typical export PATH=... if specified)
  3. The bash version of the dotnet-install script is both much trickier to add this to and as noted, has no need for the feature.

This change, along with some helix script changes which restore the registry every work item on Windows, buys us basically unlimited time to solve this problem the right way, which is to make the changes described in https://github.com/dotnet/arcade/issues/6005

0reactions
MattGalcommented, Aug 28, 2020

👀

I plan to work on this next week after I get the existing workarounds merged for this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

dotnet-install scripts - .NET CLI
Specifies the installation path. The directory is created if it doesn't exist. The default value is %LocalAppData%\Microsoft\dotnet on Windows ...
Read more >
dotnet command - .NET CLI
The dotnet command has two functions: It provides commands for working with .NET projects. For example, dotnet build builds a project.
Read more >
Troubleshoot .NET tool usage issues
Discover the common issues when running .NET tools and possible solutions.
Read more >
Support running on M1 Macs · Issue #2834 · Azure ...
Im running on python 3.9.10 on Latest Azure functions 3x I previously had a project running on 2x and just recently created a...
Read more >
The .NET Core SDK cannot be located. . ...
Just simply close your VS Code app. It seems the error is produced because you are installing .NET Core SDK when your VS...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found