Skip to content

Commit

Permalink
Additional logging.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lifeng Lu committed Aug 27, 2023
1 parent fb0e177 commit 70715d3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/MSBuildLocator/DotNetSdkLocationHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,12 @@ private static IntPtr HostFxrResolver(Assembly assembly, string libraryName)

if (File.Exists(hostFxrAssembly))
{
return NativeLibrary.TryLoad(hostFxrAssembly, out var handle) ? handle : IntPtr.Zero;
if (NativeLibrary.TryLoad(hostFxrAssembly, out var handle))
{
return handle;
}

Console.Error.WriteLine($"'{hostFxrAssembly}' cannot be loaded.");
}
else
{
Expand Down

0 comments on commit 70715d3

Please sign in to comment.