Skip to content

Commit

Permalink
Fix writing Binding Redirect files
Browse files Browse the repository at this point in the history
  • Loading branch information
MeFisto94 committed Apr 18, 2024
1 parent 5b78e3d commit 3cb7100
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions BindingRedirects.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ public static void Setup(string exePath, string dllName)
}
}

public static void CopyRedirects(string sourceFile, string frameworkPath, string applicationFile)
public static void CopyRedirects(string sourceFile, string applicationPath, string applicationFile)
{
File.Copy(sourceFile, Path.Combine(frameworkPath, applicationFile + ".config"), true);
File.Copy(sourceFile, Path.Combine(applicationPath, applicationFile + ".config"), true);
}

// TODO: Merge XML files, but this may be non-trivial due to actual version conflicts, so rather make downstream frameworks supply the right config files.
Expand Down
2 changes: 1 addition & 1 deletion CommandLine/CliEntryPoint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ protected virtual void SetupBindingRedirects(string applicationPath, string fram
redirectFile = "Andraste.Payload.Generic.dll.config";
}

BindingRedirects.CopyRedirects(redirectFile, AppDomain.CurrentDomain.BaseDirectory, Path.GetFileName(applicationPath));
BindingRedirects.CopyRedirects(redirectFile, Directory.GetParent(applicationPath)!.FullName, Path.GetFileName(applicationPath));
}

protected virtual void MonitorGame(bool nonInteractive, string applicationPath, string frameworkDllName,
Expand Down

0 comments on commit 3cb7100

Please sign in to comment.