Skip to content

Commit

Permalink
VS2017 Compability: Use newtonsoft.json
Browse files Browse the repository at this point in the history
  • Loading branch information
nokotan committed Jul 15, 2024
1 parent 54093c8 commit 0f0409f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Emscripten.DebuggerLauncher/DebuggerLaunchProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using System.ComponentModel.Composition;
using System.Diagnostics;
using System.IO;
using System.Text.Json;
using Newtonsoft.Json;
using System.Threading.Tasks;
using Microsoft.VisualStudio.ProjectSystem;
using Microsoft.VisualStudio.ProjectSystem.Debug;
Expand Down Expand Up @@ -73,7 +73,7 @@ public override async Task<IReadOnlyList<IDebugLaunchSettings>> QueryDebugTarget
settings.Executable = @"C:\Windows\System32\cmd.exe"; // dummy

settings.LaunchDebugEngineGuid = new Guid("A18E581E-F120-4E9F-A0D4-D284EB773257");
settings.Options = JsonSerializer.Serialize(config);
settings.Options = JsonConvert.SerializeObject(config);

var serverProcess = new Process();

Expand Down
4 changes: 2 additions & 2 deletions Emscripten.DebuggerLauncher/NodeDebuggerLaunchProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using System.ComponentModel.Composition;
using System.Diagnostics;
using System.IO;
using System.Text.Json;
using Newtonsoft.Json;
using System.Threading.Tasks;
using Microsoft.VisualStudio.ProjectSystem;
using Microsoft.VisualStudio.ProjectSystem.Debug;
Expand Down Expand Up @@ -69,7 +69,7 @@ public override async Task<IReadOnlyList<IDebugLaunchSettings>> QueryDebugTarget
settings.Executable = @"C:\Windows\System32\cmd.exe"; // dummy

settings.LaunchDebugEngineGuid = new Guid("A18E581E-F120-4E9F-A0D4-D284EB773257");
settings.Options = JsonSerializer.Serialize(config);
settings.Options = JsonConvert.SerializeObject(config);

return new IDebugLaunchSettings[] { settings };
}
Expand Down
6 changes: 3 additions & 3 deletions Emscripten.DebuggerLauncher/WebAssemblyDebuggerConfig.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.IO;
using System.Linq;
using System.Text.Json.Serialization;
using Newtonsoft.Json;

#if VS2017
namespace Emscripten.DebuggerLauncher.vs2017
Expand All @@ -12,7 +12,7 @@ public class WebAssemblyDebuggerConfig
{
public string type { get; set; }
public string url { get; set; }
[JsonPropertyName("$adapter")]
[JsonProperty("$adapter")]
public string adapterExecutable { get; set; }
public string[] flags { get; set; }
public string userDataDir { get; set; }
Expand Down Expand Up @@ -57,7 +57,7 @@ public class NodeWebAssemblyDebuggerConfig
{
public string type { get; set; }
public string program { get; set; }
[JsonPropertyName("$adapter")]
[JsonProperty("$adapter")]
public string adapterExecutable { get; set; }
public string node { get; set; }
public string cwd { get; set; }
Expand Down

0 comments on commit 0f0409f

Please sign in to comment.