MarcinZiabek 2 年之前
父節點
當前提交
4c679978be

+ 1 - 1
QuestPDF.ReportSample/Tests.cs

@@ -25,7 +25,7 @@ namespace QuestPDF.ReportSample
         [Test] 
         public void GenerateAndShowPdf()
         {
-            Report.ShowInPreviewer(5000);
+            Report.ShowInPreviewer();
             
             //ImagePlaceholder.Solid = true;
             //

+ 1 - 1
QuestPDF/Previewer/ApiRequests.cs

@@ -11,7 +11,7 @@ internal sealed class IncompatibleVersionApiRequest
 
 internal sealed class NotifyPresenceApiRequest
 {
-    public string Id { get; set; }
+    public string ClientId { get; set; }
     public string LibraryVersion { get; set; }
     public bool IsDotnet6OrBeyond { get; set; }
     public bool IsDotnet3OrBeyond { get; set; }

+ 4 - 3
QuestPDF/Previewer/PreviewerService.cs

@@ -128,11 +128,12 @@ namespace QuestPDF.Previewer
         #endregion
         
         #region Checking compatibility
-        
+
         private async Task<Version> GetPreviewerVersion()
         {
             using var result = await HttpClient.GetAsync("/version");
-            return await result.Content.ReadFromJsonAsync<Version>();
+            var response = await result.Content.ReadFromJsonAsync<string>();
+            return Version.Parse(response);
         }
 
         private async Task CheckVersionCompatibility(Version version)
@@ -173,7 +174,7 @@ namespace QuestPDF.Previewer
         {
             var payload = new NotifyPresenceApiRequest
             {
-                Id = ClientId,
+                ClientId = ClientId,
                 LibraryVersion = LibraryVersion,
                 IsDotnet6OrBeyond = RuntimeDetector.IsNet6OrGreater,
                 IsDotnet3OrBeyond = RuntimeDetector.IsNet3OrGreater,

+ 1 - 1
SimpleApp/SimpleApp.csproj

@@ -2,7 +2,7 @@
 
     <PropertyGroup>
         <OutputType>Exe</OutputType>
-        <TargetFramework>net6.0</TargetFramework>
+        <TargetFramework>net5.0</TargetFramework>
         <ImplicitUsings>enable</ImplicitUsings>
         <Nullable>enable</Nullable>
         <LangVersion>10</LangVersion>