Skip to content

Commit 922f095

Browse files
committed
fix: Define the working directory for add-in discovery
1 parent e2b56e5 commit 922f095

File tree

1 file changed

+5
-4
lines changed
  • src/Uno.UI.RemoteControl.Host/Extensibility

1 file changed

+5
-4
lines changed

src/Uno.UI.RemoteControl.Host/Extensibility/AddIns.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ public class AddIns
1717
public static IImmutableList<string> Discover(string solutionFile)
1818
{
1919
var tmp = Path.GetTempFileName();
20-
var command = $"build \"{solutionFile}\" --target:UnoDumpTargetFrameworks \"-p:UnoDumpTargetFrameworksTargetFile={tmp}\" --verbosity quiet";
21-
var result = ProcessHelper.RunProcess("dotnet", command);
20+
var wd = Path.GetDirectoryName(solutionFile);
21+
var command = $"build \"{solutionFile}\" -t:UnoDumpTargetFrameworks \"-p:UnoDumpTargetFrameworksTargetFile={tmp}\" --verbosity quiet";
22+
var result = ProcessHelper.RunProcess("dotnet", command, wd);
2223
var targetFrameworks = Read(tmp);
2324

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

0 commit comments

Comments
 (0)