Skip to content

Commit

Permalink
Merge branch 'develop' into fix/cli-runner-paths-9680
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcouffin authored Jan 24, 2025
2 parents ad5f62a + e70ba0b commit 94394d8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
15 changes: 15 additions & 0 deletions dev/pyRevitLabs/pyRevitCLI/PyRevitCLI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,21 @@ public static string CLIInfoVersion {

// cli entry point:
static void Main(string[] args) {
AppDomain.CurrentDomain.AssemblyResolve += (sender, args) =>
{
if (args.Name.StartsWith("Newtonsoft.Json,"))
{
var assemblyPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "pyRevitLabs.Json.dll");
logger.Debug($"Looking for Newtonsoft.Json assembly at: {assemblyPath}");
if (File.Exists(assemblyPath))
{
var assembly = Assembly.LoadFrom(assemblyPath);
logger.Debug($"Successfully loaded Newtonsoft.Json assembly from: {assemblyPath}");
return assembly;
}
}
return null;
};
// process arguments for logging level
var argsList = new List<string>(args);

Expand Down
1 change: 1 addition & 0 deletions docs/dev-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Install Visual Studio 2022 and select:
- .NET Framework 4.7.2 Targeting Pack
- .NET Framework 4.8 SDK
- .NET Framework 4.8 Targeting Pack
- .NET 3.1 Runtime (MahApps.Metro)
- NuGet package manager
- MSBuild

Expand Down

0 comments on commit 94394d8

Please sign in to comment.