Skip to content

Commit

Permalink
Merge pull request #1718 from Marioalexsan/cli-use-newtonsoft
Browse files Browse the repository at this point in the history
Add Newtonsoft.Json to the list of assemblies available in CLI scripts
  • Loading branch information
BenjaminUrquhart authored Apr 7, 2024
2 parents 3da49e5 + fff2e86 commit 5041dd3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions UndertaleModCli/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
using System.Threading;
using System.Threading.Tasks;
using UndertaleModLib.Models;
using Newtonsoft.Json;

namespace UndertaleModCli;

Expand Down Expand Up @@ -193,6 +194,7 @@ public Program(FileInfo datafile, FileInfo[] scripts, FileInfo output, bool verb
"System.Text.RegularExpressions")
.AddReferences(typeof(UndertaleObject).GetTypeInfo().Assembly,
GetType().GetTypeInfo().Assembly,
typeof(JsonConvert).GetTypeInfo().Assembly,
typeof(System.Text.RegularExpressions.Regex).GetTypeInfo().Assembly,
typeof(TextureWorker).GetTypeInfo().Assembly)
// "WithEmitDebugInformation(true)" not only lets us to see a script line number which threw an exception,
Expand Down
1 change: 1 addition & 0 deletions UndertaleModCli/UndertaleModCli.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Scripting" Version="4.8.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
<PackageReference Include="runtime.osx.10.10-x64.CoreCompat.System.Drawing" Version="6.0.5.128" />
<PackageReference Include="System.CommandLine" Version="2.0.0-beta1.21308.1" />
</ItemGroup>
Expand Down

0 comments on commit 5041dd3

Please sign in to comment.