Skip to content

Commit

Permalink
fix: Define the working directory for add-in discovery
Browse files Browse the repository at this point in the history
  • Loading branch information
dr1rrb committed Dec 4, 2024
1 parent e2b56e5 commit 922f095
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/Uno.UI.RemoteControl.Host/Extensibility/AddIns.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ public class AddIns
public static IImmutableList<string> Discover(string solutionFile)
{
var tmp = Path.GetTempFileName();
var command = $"build \"{solutionFile}\" --target:UnoDumpTargetFrameworks \"-p:UnoDumpTargetFrameworksTargetFile={tmp}\" --verbosity quiet";
var result = ProcessHelper.RunProcess("dotnet", command);
var wd = Path.GetDirectoryName(solutionFile);
var command = $"build \"{solutionFile}\" -t:UnoDumpTargetFrameworks \"-p:UnoDumpTargetFrameworksTargetFile={tmp}\" --verbosity quiet";
var result = ProcessHelper.RunProcess("dotnet", command, wd);
var targetFrameworks = Read(tmp);

if (targetFrameworks.IsEmpty)
Expand Down Expand Up @@ -50,8 +51,8 @@ public static IImmutableList<string> Discover(string solutionFile)
foreach (var targetFramework in targetFrameworks)
{
tmp = Path.GetTempFileName();
command = $"build \"{solutionFile}\" --target:UnoDumpRemoteControlAddIns \"-p:UnoDumpRemoteControlAddInsTargetFile={tmp}\" --verbosity quiet --framework \"{targetFramework}\" -nowarn:MSB4057";
result = ProcessHelper.RunProcess("dotnet", command);
command = $"build \"{solutionFile}\" -t:UnoDumpRemoteControlAddIns \"-p:UnoDumpRemoteControlAddInsTargetFile={tmp}\" --verbosity quiet --framework \"{targetFramework}\" -nowarn:MSB4057";
result = ProcessHelper.RunProcess("dotnet", command, wd);
if (!string.IsNullOrWhiteSpace(result.error))
{
if (_log.IsEnabled(LogLevel.Warning))
Expand Down

0 comments on commit 922f095

Please sign in to comment.