You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
using JsonPatch packages not working in blazor-wasm #64330
I have a client API project which uses Microsoft.AspNetCore.JsonPatch nuget to be able to call PATCH requests with JsonPatchDocument<>.
When upgrading to version 10 either with Microsoft.AspNetCore.JsonPatch or Microsoft.AspNetCore.JsonPatch.SystemTextJson, my blazor-wasm project is not compiling anymore. It seems the JsonPatch is having a link to aspnet SDK.
The build error:
>C:\Program Files\dotnet\sdk\10.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(544,5): error NETSDK1082: There was no runtime pack for Microsoft.AspNetCore.App available for the specified RuntimeIdentifier 'browser-wasm'.
Expected Behavior
IMO, this package should work in blazor wasm projects
Steps To Reproduce
Create a Blazor Web App with in Auto mode.
Add reference to Microsoft.AspNetCore.JsonPatch 10.0.0 in the App.Client project
Build
Here a minimal repro project as a simple Blazor where client part just referencing JsonPatch assembly in .Net 10. BlazorJsonPatch10CompilationError
In summary, if I use in Client WebAssembly: <PackageReference Include="Microsoft.AspNetCore.JsonPatch" Version="10.0.0" />
Then I will get this error: 1>C:\Program Files\dotnet\sdk\10.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(544,5): error NETSDK1082: There was no runtime pack for Microsoft.AspNetCore.App available for the specified RuntimeIdentifier 'browser-wasm'.
But no error if I put this previous one: <PackageReference Include="Microsoft.AspNetCore.JsonPatch" Version="9.0.11" />
@joperezr@mikekistler Did we accidentally introduce an ASP.NET Core framework reference to our JSON Patch support in .NET 10?
If this dependency in csproj: <Reference Include="Microsoft.AspNetCore.Http.Abstractions" Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'" /> with this property inside Microsoft.AspNetCore.Http.Abstractions : <IsAspNetCoreApp>true</IsAspNetCoreApp> and the fact that <IsPackable>false</IsPackable> could be the issue?
Honestly it never crossed my mind that someone would use this outside the context of an ASP.NET Core app. Was that a requirement?
Yeah, it's not uncommon to use JsonPatchDocument to create PATCH requests that you then send with HttpClient, although I don't know that we've ever officially documented that as a scenario. This does appear to be related to the Microsoft.AspNetCore.Http.Abstractions dependency.
I don't understand why we made any changes to the old Newtonsoft-based package
It made sense when I picked it up that the implementations should be symmetrical, but the root cause could be attributed to Copilot as it did that in the original #62057 PR that I picked up the work from.
I didn't know the packages needed to support Blazor-WASM, the test coverage didn't highlight it broke the scenario, and human reviewers didn't spot it either.
Reacted by Daniel Roth, Cédric Tallichet and Jarred Beverly
The only thing that I can think for us to fix this at this point will be to produce a separate package for wasm for the S.T.J implementation (I imagine people can still use the old newtonsoft.json package in wasm)
We can't take back adding/removing interfaces in patches (don't ask me how I know)
As per my understanding, the lib should be used for both server and client side. Since then, it should run in WASM and MAUI, as they are common client technologies.
The proposed fix did not fix the issue on this thread. I still get: There was no runtime pack for Microsoft.AspNetCore.App available for the specified RuntimeIdentifier 'browser-wasm'.
Please re-open this issue.
This issue was closed as fixed by #65674, but the fix is incomplete. The 10.0.5 package still declares in its nuspec despite the IEndpointParameterMetadataProvider code being reverted. This means the package still can't be used in Blazor WASM or in apps
running on dotnet/runtime images without the ASP.NET Core shared framework.
The PR linked to this issue only fixes the issue for the newtonsoft based JsonPatch (Microsoft.AspNetCore.JsonPatch) being used from blazor wasm or other environments w/o asp.net core stuff. The Microsoft.AspNetCore.JsonPatch.SystemTextJson is still not usable from blazor wasm. I would like to have a SJT based, json patch library available in blazor wasm:
I don't want my blazor wasm app to have a dependency on newtonsoft
I need to generate and perform patch operations on the client side (json patch is great for merging incoming changes or implementing an "undo" feature)
I need a single library to work for both wasm and asp.net server app (as it will be used in a project shared by both)
Will this issue be re-opened or shall I create a new issue?
yeah, ok I saw that, doesn't change what I want, just means it needs to be a breaking change in 11 instead right? I still want it captured somewhere that is what I want. Sounds like I need to make a new issue?
yeah, ok I saw that, doesn't change what I want, just means it needs to be a breaking change in 11 instead right? I still want it captured somewhere that is what I want. Sounds like I need to make a new issue?
Activity
MihuBot commentedon Nov 12, 2025
I'm a bot. Here are possible related and/or duplicate issues (I may be wrong):
acoudene commentedon Nov 19, 2025
Hello,
I have the same problem.
Here a minimal repro project as a simple Blazor where client part just referencing JsonPatch assembly in .Net 10.
BlazorJsonPatch10CompilationError
In summary, if I use in Client WebAssembly:
<PackageReference Include="Microsoft.AspNetCore.JsonPatch" Version="10.0.0" />Then I will get this error:
1>C:\Program Files\dotnet\sdk\10.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(544,5): error NETSDK1082: There was no runtime pack for Microsoft.AspNetCore.App available for the specified RuntimeIdentifier 'browser-wasm'.But no error if I put this previous one:
<PackageReference Include="Microsoft.AspNetCore.JsonPatch" Version="9.0.11" />danroth27 commentedon Nov 21, 2025
@joperezr @mikekistler Did we accidentally introduce an ASP.NET Core framework reference to our JSON Patch support in .NET 10?
acoudene commentedon Nov 21, 2025
If this dependency in csproj:
<Reference Include="Microsoft.AspNetCore.Http.Abstractions" Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'" />with this property inside Microsoft.AspNetCore.Http.Abstractions :<IsAspNetCoreApp>true</IsAspNetCoreApp>and the fact that<IsPackable>false</IsPackable>could be the issue?mikekistler commentedon Nov 21, 2025
Honestly it never crossed my mind that someone would use this outside the context of an ASP.NET Core app. Was that a requirement?
danroth27 commentedon Nov 21, 2025
Yeah, it's not uncommon to use JsonPatchDocument to create PATCH requests that you then send with HttpClient, although I don't know that we've ever officially documented that as a scenario. This does appear to be related to the Microsoft.AspNetCore.Http.Abstractions dependency.
11 remaining items
martincostello commentedon Nov 25, 2025
It made sense when I picked it up that the implementations should be symmetrical, but the root cause could be attributed to Copilot as it did that in the original #62057 PR that I picked up the work from.
I didn't know the packages needed to support Blazor-WASM, the test coverage didn't highlight it broke the scenario, and human reviewers didn't spot it either.
javiercn commentedon Nov 25, 2025
The only thing that I can think for us to fix this at this point will be to produce a separate package for wasm for the S.T.J implementation (I imagine people can still use the old newtonsoft.json package in wasm)
We can't take back adding/removing interfaces in patches (don't ask me how I know)
tallichet commentedon Nov 26, 2025
As per my understanding, the lib should be used for both server and client side. Since then, it should run in WASM and MAUI, as they are common client technologies.
HunterAhlquist commentedon Jan 5, 2026
Having the same problem since I am using JsonPatch in the frontend. Downgrading to the .NET 9 version is my workaround
mdbreger commentedon Feb 24, 2026
Can we please have an update on this blocking topic ?
HunterAhlquist commentedon Mar 5, 2026
The proposed fix did not fix the issue on this thread. I still get:
There was no runtime pack for Microsoft.AspNetCore.App available for the specified RuntimeIdentifier 'browser-wasm'.Please re-open this issue.
martincostello commentedon Mar 5, 2026
The issue is closed as the relevant code changes have been made, but it hasn't been released.
HunterAhlquist commentedon Mar 5, 2026
My bad, I really should work on my reading comprehension. 🤦♂️
brumlemann commentedon Mar 17, 2026
This issue was closed as fixed by #65674, but the fix is incomplete. The 10.0.5 package still declares in its nuspec despite the IEndpointParameterMetadataProvider code being reverted. This means the package still can't be used in Blazor WASM or in apps
running on dotnet/runtime images without the ASP.NET Core shared framework.
See my comment on #65674 for details and evidence: (link to PR comment)
davidmilligan commentedon May 14, 2026
The PR linked to this issue only fixes the issue for the newtonsoft based JsonPatch (
Microsoft.AspNetCore.JsonPatch) being used from blazor wasm or other environments w/o asp.net core stuff. TheMicrosoft.AspNetCore.JsonPatch.SystemTextJsonis still not usable from blazor wasm. I would like to have a SJT based, json patch library available in blazor wasm:Will this issue be re-opened or shall I create a new issue?
martincostello commentedon May 14, 2026
From #64330 (comment):
davidmilligan commentedon May 14, 2026
yeah, ok I saw that, doesn't change what I want, just means it needs to be a breaking change in 11 instead right? I still want it captured somewhere that is what I want. Sounds like I need to make a new issue?
danroth27 commentedon May 19, 2026
@davidmilligan See #65986