diff --git a/README.md b/README.md index 603d5f9da..6b9609143 100644 --- a/README.md +++ b/README.md @@ -99,6 +99,12 @@ Refit 6 makes [System.Text.Json](https://docs.microsoft.com/en-us/dotnet/standar `IContentSerializer` was renamed to `IHttpContentSerializer` to better reflect its purpose. Additionally, two of its methods were renamed, `SerializeAsync` -> `ToHttpContent` and `DeserializeAsync` -> `FromHttpContentAsync`. Any existing implementations of these will need to be updated, though the changes should be minor. +##### Updates in 6.3 + +Refit 6.3 splits out the XML serialization via `XmlContentSerializer` into a separate package, `Refit.Xml`. This +is to reduce the dependency size when using Refit with Web Assembly (WASM) applications. If you require XML, add a reference +to `Refit.Xml`. + ### API Attributes Every method must have an HTTP attribute that provides the request method and diff --git a/Refit.Tests/Refit.Tests.csproj b/Refit.Tests/Refit.Tests.csproj index 47a27ffe9..67b38d144 100644 --- a/Refit.Tests/Refit.Tests.csproj +++ b/Refit.Tests/Refit.Tests.csproj @@ -23,6 +23,7 @@ + diff --git a/Refit.Xml/Refit.Xml.csproj b/Refit.Xml/Refit.Xml.csproj new file mode 100644 index 000000000..4a7bcb144 --- /dev/null +++ b/Refit.Xml/Refit.Xml.csproj @@ -0,0 +1,23 @@ + + + + Refit Xml Serializer ($(TargetFramework)) + Refit Serializers for Xml + net6.0;net5.0;netstandard2.0;net461 + true + Refit + enable + + + + + + + + + + + + diff --git a/Refit/XmlContentSerializer.cs b/Refit.Xml/XmlContentSerializer.cs similarity index 100% rename from Refit/XmlContentSerializer.cs rename to Refit.Xml/XmlContentSerializer.cs diff --git a/Refit.sln b/Refit.sln index b275022a3..5973b1e3c 100644 --- a/Refit.sln +++ b/Refit.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.28621.142 +# Visual Studio Version 17 +VisualStudioVersion = 17.2.32207.482 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{4F1C8991-7097-4471-A9A6-A72005AB594D}" ProjectSection(SolutionItems) = preProject @@ -29,6 +29,8 @@ Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "InterfaceStubGenerator.Shar EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "InterfaceStubGenerator.Roslyn40", "InterfaceStubGenerator.Roslyn40\InterfaceStubGenerator.Roslyn40.csproj", "{A4B61169-3314-41DB-8156-BE9677C90C9F}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Refit.Xml", "Refit.Xml\Refit.Xml.csproj", "{C4E38B33-3D17-47A7-A47F-8F3900F07499}" +EndProject Global GlobalSection(SharedMSBuildProjectFiles) = preSolution InterfaceStubGenerator.Shared\InterfaceStubGenerator.Shared.projitems*{72869789-0310-4916-9a41-20d16a01c1b8}*SharedItemsImports = 5 @@ -142,6 +144,22 @@ Global {A4B61169-3314-41DB-8156-BE9677C90C9F}.Release|x64.Build.0 = Release|Any CPU {A4B61169-3314-41DB-8156-BE9677C90C9F}.Release|x86.ActiveCfg = Release|Any CPU {A4B61169-3314-41DB-8156-BE9677C90C9F}.Release|x86.Build.0 = Release|Any CPU + {C4E38B33-3D17-47A7-A47F-8F3900F07499}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C4E38B33-3D17-47A7-A47F-8F3900F07499}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C4E38B33-3D17-47A7-A47F-8F3900F07499}.Debug|ARM.ActiveCfg = Debug|Any CPU + {C4E38B33-3D17-47A7-A47F-8F3900F07499}.Debug|ARM.Build.0 = Debug|Any CPU + {C4E38B33-3D17-47A7-A47F-8F3900F07499}.Debug|x64.ActiveCfg = Debug|Any CPU + {C4E38B33-3D17-47A7-A47F-8F3900F07499}.Debug|x64.Build.0 = Debug|Any CPU + {C4E38B33-3D17-47A7-A47F-8F3900F07499}.Debug|x86.ActiveCfg = Debug|Any CPU + {C4E38B33-3D17-47A7-A47F-8F3900F07499}.Debug|x86.Build.0 = Debug|Any CPU + {C4E38B33-3D17-47A7-A47F-8F3900F07499}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C4E38B33-3D17-47A7-A47F-8F3900F07499}.Release|Any CPU.Build.0 = Release|Any CPU + {C4E38B33-3D17-47A7-A47F-8F3900F07499}.Release|ARM.ActiveCfg = Release|Any CPU + {C4E38B33-3D17-47A7-A47F-8F3900F07499}.Release|ARM.Build.0 = Release|Any CPU + {C4E38B33-3D17-47A7-A47F-8F3900F07499}.Release|x64.ActiveCfg = Release|Any CPU + {C4E38B33-3D17-47A7-A47F-8F3900F07499}.Release|x64.Build.0 = Release|Any CPU + {C4E38B33-3D17-47A7-A47F-8F3900F07499}.Release|x86.ActiveCfg = Release|Any CPU + {C4E38B33-3D17-47A7-A47F-8F3900F07499}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Refit/Properties/AssemblyInfo.cs b/Refit/Properties/AssemblyInfo.cs index c2b404f5f..b1b7307fd 100644 --- a/Refit/Properties/AssemblyInfo.cs +++ b/Refit/Properties/AssemblyInfo.cs @@ -3,3 +3,4 @@ [assembly: InternalsVisibleTo("Refit.Tests, PublicKey=00240000048000009400000006020000002400005253413100040000010001009dc017250415a0d51fddb74de84257c388028f04893673ca5c8f9e7145aea2b11443cb49dd79386d2255179a79ec516466b621f77e43386e711b775f77bb0e4b217f8c208c054e5f515ae33ee76bac1b56cdc20e1c151cf026a9b7f8362f1963825e546e16b360dfc63fe670403c9d6152c24491dd5dfb9ff68fe102ef3e1aed")] [assembly: InternalsVisibleTo("Refit.HttpClientFactory, PublicKey=00240000048000009400000006020000002400005253413100040000010001009dc017250415a0d51fddb74de84257c388028f04893673ca5c8f9e7145aea2b11443cb49dd79386d2255179a79ec516466b621f77e43386e711b775f77bb0e4b217f8c208c054e5f515ae33ee76bac1b56cdc20e1c151cf026a9b7f8362f1963825e546e16b360dfc63fe670403c9d6152c24491dd5dfb9ff68fe102ef3e1aed")] [assembly: InternalsVisibleTo("Refit.Newtonsoft.Json, PublicKey=00240000048000009400000006020000002400005253413100040000010001009dc017250415a0d51fddb74de84257c388028f04893673ca5c8f9e7145aea2b11443cb49dd79386d2255179a79ec516466b621f77e43386e711b775f77bb0e4b217f8c208c054e5f515ae33ee76bac1b56cdc20e1c151cf026a9b7f8362f1963825e546e16b360dfc63fe670403c9d6152c24491dd5dfb9ff68fe102ef3e1aed")] +[assembly: InternalsVisibleTo("Refit.Xml, PublicKey=00240000048000009400000006020000002400005253413100040000010001009dc017250415a0d51fddb74de84257c388028f04893673ca5c8f9e7145aea2b11443cb49dd79386d2255179a79ec516466b621f77e43386e711b775f77bb0e4b217f8c208c054e5f515ae33ee76bac1b56cdc20e1c151cf026a9b7f8362f1963825e546e16b360dfc63fe670403c9d6152c24491dd5dfb9ff68fe102ef3e1aed")] diff --git a/version.json b/version.json index 790c870b4..aa3467eaf 100644 --- a/version.json +++ b/version.json @@ -1,5 +1,5 @@ { - "version": "6.2", + "version": "6.3", "publicReleaseRefSpec": [ "^refs/heads/main$", // we release out of main "^refs/heads/rel/v\\d+\\.\\d+" // we also release branches starting with vN.N