Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,8 @@ This feature certainly provides a somewhat duplicate functionality to the existi
* RID fallback graph from the root framework - reused
* Just like settings, there's a set of environment variables which are used in the same way as the app would use them
* `DOTNET_ROLL_FORWARD_ON_NO_CANDIDATE_FX` - used just like in the app
* `ProgramFiles` and `ProgramFiles(x86")` - used to find servicing root and the shared store
* `ProgramFiles` and `ProgramFiles(x86")` - used to find servicing root
* `DOTNET_SHARED_STORE` - used to find the shared store - just like the app
* `DOTNET_MULTILEVEL_LOOKUP` - used to enable multi-level lookup - used just like in the app
* Right now this feature doesn't process `.runtimeconfig.json` or `.runtimeconfig.dev.json`. Most dynamically loaded components don't have these anyway, since SDK doesn't generate these for the `classlib` project type. The only meaningful piece of info from these which could be used is the set of probing paths to use. Currently the same set ofprobing paths as for the app is used. With the changes in .NET Core 3 where `dotnet build` will copy all static dependencies locally, the importance of additional probing paths should be very low anyway.

## Open questions
Expand Down
5 changes: 1 addition & 4 deletions docs/design/features/host-probing.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,11 @@ The list of probing paths ordered according to their priority. First path in the
If the app (or framework) has dependencies on frameworks, these frameworks are used as probing paths.
The order is from the higher level framework to lower level framework. The app is considered the highest level, it direct dependencies are next and so on.
For assets from frameworks, only that framework and lower level frameworks are considered.
Note: These directories come directly out of the framework resolution process. Special note on Windows where global locations are always considered even if the app is not executed via the shared `dotnet.exe`. More details can be found in [Shared FX Lookup](sharedfx-lookup.md).
Note: These directories come directly out of the framework resolution process. More details can be found in [Shared FX Lookup](sharedfx-lookup.md).
* Shared store paths
* `$DOTNET_SHARED_STORE/|arch|/|tfm|` - The environment variable `DOTNET_SHARED_STORE` can contain multiple paths, in which case each is appended with `|arch|/|tfm|` and used as a probing path.
* If the app is executed through `dotnet.exe` then path relative to the directory with the `dotnet.exe` is used
* `<dotnet.exe path>/store/|arch|/|tfm|`
* On Windows, the global shared store is used
* If running in WOW64 mode - `%ProgramFiles(x86)%\dotnet\store\|arch|\|tfm|`
* Otherwise - `%ProgramFiles%\dotnet\store\|arch|\|tfm|`
* Additional probing paths
In these paths the `|arch|/|tfm|` string can be used and will be replaced with the actual values before using the path.
* `--additionalprobingpath` command line arguments
Expand Down
2 changes: 1 addition & 1 deletion docs/design/features/hosting-layer-apis.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ int32_t hostfxr_resolve_sdk2(
hostfxr_resolve_sdk2_result_fn result)
```

Determine the directory location of the SDK, accounting for global.json and multi-level lookup policy.
Determine the directory location of the SDK, accounting for global.json.
* `exe_dir` - main directory where SDKs are located in `sdk\[version]` sub-folders.
* `working_dir` - directory where the search for `global.json` will start and proceed upwards
* `flags` - flags that influence resolution
Expand Down
1 change: 0 additions & 1 deletion src/installer/tests/AppHost.Bundle.Tests/AppLaunch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ public void DisableCetCompat(bool selfContained)
.CaptureStdErr()
.CaptureStdOut()
.DotNetRoot(HostTestContext.BuiltDotNet.BinPath, HostTestContext.BuildArchitecture)
.MultilevelLookup(false)
.Execute()
.Should().Pass()
.And.HaveStdOutContaining("Hello World")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ private FluentAssertions.AndConstraint<CommandResultAssertions> RunTheApp(string
CommandResult result = Command.Create(path)
.EnableTracingAndCaptureOutputs()
.DotNetRoot(selfContained ? null : HostTestContext.BuiltDotNet.BinPath)
.MultilevelLookup(false)
.Execute();
if (deleteApp)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ public CommandResult RunComponentResolutionTest(string componentPath, TestApp ho
};

Command command = Command.Create(NativeHostPath, args)
.EnableTracingAndCaptureOutputs()
.MultilevelLookup(false);
.EnableTracingAndCaptureOutputs();
commandCustomizer?.Invoke(command);

return command.Execute(caller)
Expand All @@ -89,7 +88,6 @@ public CommandResult RunComponentResolutionMultiThreadedTest(string componentOne

return Command.Create(NativeHostPath, args)
.EnableTracingAndCaptureOutputs()
.MultilevelLookup(false)
.Execute(caller);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ public void AppHost()
.CaptureStdErr()
.CaptureStdOut()
.DotNetRoot(HostTestContext.BuiltDotNet.BinPath, HostTestContext.BuildArchitecture)
.MultilevelLookup(false)
.Execute()
.Should().Pass()
.And.HaveStdOutContaining("Hello World")
Expand All @@ -210,7 +209,6 @@ public void AppHost_DisableCetCompat()
.CaptureStdErr()
.CaptureStdOut()
.DotNetRoot(HostTestContext.BuiltDotNet.BinPath, HostTestContext.BuildArchitecture)
.MultilevelLookup(false)
.Execute()
.Should().Pass()
.And.HaveStdOutContaining("Hello World")
Expand Down Expand Up @@ -265,7 +263,6 @@ public void RuntimeConfig_FilePath_Breaks_MAX_PATH_Threshold()
Command.Create(appExe)
.DotNetRoot(HostTestContext.BuiltDotNet.BinPath)
.EnableTracingAndCaptureOutputs()
.MultilevelLookup(false)
.Execute()
.Should().Pass()
.And.HaveStdOutContaining("Hello World");
Expand Down Expand Up @@ -298,7 +295,6 @@ public void MissingRuntimeConfig_Fails(bool useAppHost)
}

command.EnableTracingAndCaptureOutputs()
.MultilevelLookup(false)
.Execute()
.Should().Fail()
.And.HaveStdErrContaining($"The library '{Binaries.HostPolicy.FileName}' required to execute the application was not found")
Expand Down Expand Up @@ -402,7 +398,6 @@ public void AppHost_CLI_MissingRuntimeFramework_ErrorReportedInStdErr(bool missi
CommandResult result = Command.Create(sharedTestState.App.AppExe)
.EnableTracingAndCaptureOutputs()
.DotNetRoot(invalidDotNet.Location)
.MultilevelLookup(false)
.Execute();

result.Should().Fail()
Expand Down Expand Up @@ -433,7 +428,6 @@ public void AppHost_GUI_MissingRuntimeFramework_ErrorReportedInDialog()
Command command = Command.Create(appExe)
.EnableTracingAndCaptureOutputs()
.DotNetRoot(invalidDotNet.Location)
.MultilevelLookup(false)
.Start();

WindowsUtils.WaitForPopupFromProcess(command.Process);
Expand Down Expand Up @@ -463,7 +457,6 @@ public void AppHost_GUI_MissingRuntime_ErrorReportedInDialog()
var command = Command.Create(appExe)
.EnableTracingAndCaptureOutputs()
.DotNetRoot(invalidDotNet.Location)
.MultilevelLookup(false)
.Start();

WindowsUtils.WaitForPopupFromProcess(command.Process);
Expand Down Expand Up @@ -498,7 +491,6 @@ public void AppHost_GUI_NoCustomErrorWriter_FrameworkMissing_ErrorReportedInDial
Command command = Command.Create(appExe)
.EnableTracingAndCaptureOutputs()
.DotNetRoot(dotnet.BinPath, HostTestContext.BuildArchitecture)
.MultilevelLookup(false)
.Start();

WindowsUtils.WaitForPopupFromProcess(command.Process);
Expand Down Expand Up @@ -527,7 +519,6 @@ public void AppHost_GUI_DisabledGUIErrors_DialogNotShown()
Command.Create(appExe)
.EnableTracingAndCaptureOutputs()
.DotNetRoot(invalidDotNet.Location)
.MultilevelLookup(false)
.EnvironmentVariable(Constants.DisableGuiErrors.EnvironmentVariable, "1")
.Execute()
.Should().Fail()
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,7 @@ private void OldHost_LatestRuntime_ForwardCompatible(TestApp previousVersionApp)
.And.HaveStdErrContaining($"--- Invoked apphost [version: {previousVersion}");

// Use the older apphost and hostfxr
// This emulates the case when:
// 1) One-off deployment of older runtime (not in global location)
// 2) Older apphost executed, but found newer runtime because of multi-level lookup on Windows
// Note that we don't have multi-level on hostfxr so we will always find the older\one-off hostfxr
// This emulates the case when an older runtime is deployed one-off (not in the global location)
if (OperatingSystem.IsWindows())
{
File.Copy(previousVersionApp.HostFxrDll, app.HostFxrDll, true);
Expand Down
2 changes: 0 additions & 2 deletions src/installer/tests/HostActivation.Tests/InstallLocation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ public void EnvironmentVariable_DotnetRootPathDoesNotExist()
Command.Create(app.AppExe)
.EnableTracingAndCaptureOutputs()
.DotNetRoot("non_existent_path")
.MultilevelLookup(false)
.EnvironmentVariable(
Constants.TestOnlyEnvironmentVariables.GloballyRegisteredPath,
HostTestContext.BuiltDotNet.BinPath)
Expand All @@ -110,7 +109,6 @@ public void EnvironmentVariable_DotnetRootPathExistsButHasNoHost()
Command.Create(app.AppExe)
.EnableTracingAndCaptureOutputs()
.DotNetRoot(app.Location)
.MultilevelLookup(false)
.EnvironmentVariable(
Constants.TestOnlyEnvironmentVariables.GloballyRegisteredPath,
HostTestContext.BuiltDotNet.BinPath)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ public void ActivateClass()
CommandResult result = Command.Create(sharedState.ComSxsPath, args)
.EnableTracingAndCaptureOutputs()
.DotNetRoot(HostTestContext.BuiltDotNet.BinPath)
.MultilevelLookup(false)
.Execute();

result.Should().Pass()
Expand All @@ -51,7 +50,6 @@ public void LocateEmbeddedTlb()
CommandResult result = Command.Create(sharedState.ComSxsPath, args)
.EnableTracingAndCaptureOutputs()
.DotNetRoot(HostTestContext.BuiltDotNet.BinPath)
.MultilevelLookup(false)
.Execute();

result.Should().Pass()
Expand All @@ -71,7 +69,6 @@ public void ManagedHost(bool selfContained)
CommandResult result = Command.Create(app.AppExe, args)
.EnableTracingAndCaptureOutputs()
.DotNetRoot(HostTestContext.BuiltDotNet.BinPath)
.MultilevelLookup(false)
.Execute();

result.Should().Pass()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ public void ManagedHost(bool selfContained)
CommandResult result = Command.Create(app.AppExe, args)
.EnableTracingAndCaptureOutputs()
.DotNetRoot(HostTestContext.BuiltDotNet.BinPath)
.MultilevelLookup(false)
.Execute();

result.Should().Pass()
Expand Down
Loading
Loading