Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Define the working directory for add-in discovery (backport #18999) #19011

Merged
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
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
Loading