so desires.
The producer of `StartupHook.dll` needs to ensure that
-`StartupHook.dll` is compatible with the dependencies specified in the
-main application's deps.json, since those dependencies are put on the
-TPA list during the runtime startup, before `StartupHook.dll` is
-loaded. This means that `StartupHook.dll` needs to built against the
-same or lower version of .NET Core than the app.
+`StartupHook.dll` is compatible with the dependencies specified in the
+main application's deps.json, since those dependencies are put on the
+Trusted Platform Assemblies (TPA) list during the runtime startup,
+before `StartupHook.dll` is loaded. This means that `StartupHook.dll`
+needs to be built against the same or lower version of .NET Core than the app.
## Example
{
public static Assembly LoadAssemblyFromSharedLocation(AssemblyLoadContext context, AssemblyName assemblyName)
{
- string sharedAssemblyPath = // find assemblyName in shared location...
+ string sharedAssemblyPath = ""; // find assemblyName in shared location...
if (sharedAssemblyPath != null)
- return AssemblyLoadContext.Default.LoadFromAssemblyPath(sharedAssemblyPath)
+ return AssemblyLoadContext.Default.LoadFromAssemblyPath(sharedAssemblyPath);
return null;
}
}
The type should be made `internal` to prevent exposing it as API
surface to any managed code that happens to have access to the startup
-hook dll. However, the feature will also work if the type is `public`.
\ No newline at end of file
+hook dll. However, the feature will also work if the type is `public`.