Skip to content
This repository was archived by the owner on Apr 20, 2023. It is now read-only.

Removes usage of DOTNET_HOME in CLI repo. #1478

Merged
merged 2 commits into from
Feb 19, 2016

Conversation

TheRealPiotrP
Copy link

DOTNET_HOME is no longer required, though it is a documented override, so this change removes all unnecessary references to DOTNET_HOME from the CLI Repo.

/cc @brthor @gkhanna79 @schellap @Sridhar-MS @robmen @davidfowl

@@ -25,7 +25,6 @@
</RegistryKey>

<Environment Id="E_PATH" Name="PATH" Value="[DOTNETHOME]bin" Part="last" Action="set" System="yes" />
<Environment Id="E_DOTNET_HOME" Name="DOTNET_HOME" Value="[DOTNETHOME]" Part="all" Action="set" System="yes" />

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@schellap
Copy link

In corehost.md

Runtime resolution is controlled by these environment variables:

  • DOTNET_RUNTIME_SERVICING -> Global override for runtime
  • DOTNET_PACKAGES_CACHE -> Secondary cache
  • DOTNET_PACKAGES -> Package restore location

The runtime is located by searching the following paths in order, where APP_BASE refers to the directory containing the managed application assembly and LIBCORECLR refers to the platform-specific name for the CoreCLR library (libcoreclr.so on Unix, libcoreclr.dylib on Mac OS X, coreclr.dll on Windows). The first path that matches is used as the path to load the CoreCLR from.

  • $DOTNET_RUNTIME_SERVICING/runtime/coreclr/LIBCORECLR
  • $DOTNET_PACKAGES_CACHE/<Package Id>/<Package Version>/runtimes/<RID>/native/LICORECLR
  • APP_BASE/LIBCORECLR
  • $DOTNET_PACKAGES/<Package Id>/<Package Version>/runtimes/<RID>/native/LIBCORECLR
  • On Unix:
    • /usr/local/share/dotnet/runtime/coreclr/LIBCORECLR [1]
    • /usr/share/dotnet/runtime/coreclr/LIBCORECLR
  • On Windows:
    • %LocalAppData%\dotnet\runtime\coreclr\LIBCORECLR
    • %ProgramFiles%\dotnet\runtime\coreclr\LIBCORECLR [2]

@schellap
Copy link

How come you have lesser files? I have these...

        modified:   Documentation/manpages/dotnet-compile.1
        modified:   Documentation/manpages/dotnet-run.1
        modified:   Documentation/manpages/dotnet.1
        modified:   Documentation/specs/corehost.md
        modified:   README.md
        modified:   packaging/windows/registrykeys.wxs
        modified:   scripts/common/_common.ps1
        modified:   scripts/common/_common.sh
        modified:   scripts/common/_utility.ps1
        modified:   scripts/run-build.ps1
        modified:   scripts/run-build.sh
        modified:   src/corehost/cli/args.cpp
        modified:   src/corehost/cli/args.h
        modified:   src/dotnet/README.md
        modified:   src/dotnet/commands/dotnet-compile-csc/README.md
        modified:   src/dotnet/commands/dotnet-compile/README.md
        modified:   src/dotnet/commands/dotnet-run/README.md
        modified:   src/dotnet/commands/dotnet-run/RunCommand.cs

@bricelam
Copy link

Nuts. I was going to use this in dotnet/efcore#4602 to find the location of dotnet.exe from dotnet-ef. See the conversation in #1150.

Piotr Puszkiewicz added 2 commits February 18, 2016 15:38
DOTNET_HOME is no longer required, though it is a documented override, so this change removes all unnecessary references to DOTNET_HOME from the CLI Repo.
@TheRealPiotrP TheRealPiotrP force-pushed the piotrpMSFT/--DOTNET_HOME branch from 6308a8a to 7a9a501 Compare February 18, 2016 23:38
@schellap
Copy link

LGTM. There are a couple of uses in the corehost cpp files, but they are only useful for internal purposes.

@TheRealPiotrP
Copy link
Author

@bricelam you just made me very glad I did this PR today :)

take a look at src/Microsoft.Dotnet.Cli.Utils/CoreHost.cs

@brthor
Copy link

brthor commented Feb 18, 2016

LGTM

TheRealPiotrP pushed a commit that referenced this pull request Feb 19, 2016
Removes usage of DOTNET_HOME in CLI repo.
@TheRealPiotrP TheRealPiotrP merged commit e889274 into rel/1.0.0 Feb 19, 2016
@TheRealPiotrP TheRealPiotrP deleted the piotrpMSFT/--DOTNET_HOME branch February 19, 2016 06:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants