Skip to content
Merged
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
6 changes: 1 addition & 5 deletions src/NuGet.Core/NuGet.CommandLine.XPlat/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@
using NuGet.Common;
using NuGet.Commands;

#if DEBUG
using Microsoft.Build.Locator;
#endif

namespace NuGet.CommandLine.XPlat
{
internal class Program
Expand Down Expand Up @@ -43,7 +39,7 @@ public static int MainInternal(string[] args, CommandOutputLogger log)
// .NET JIT compiles one method at a time. If this method calls `MSBuildLocator` directly, the
// try block is never entered if Microsoft.Build.Locator.dll can't be found. So, run it in a
// lambda function to ensure we're in the try block. C# IIFE!
((Action)(() => MSBuildLocator.RegisterDefaults()))();
((Action)(() => Microsoft.Build.Locator.MSBuildLocator.RegisterDefaults()))();
}
catch
{
Expand Down