-
Notifications
You must be signed in to change notification settings - Fork 2.1k
ASP.NET Core & System.Net.Http.Formatting #5562
Comments
@smarts the For now, import the existing package as we do in the {
"dependencies": {
"Microsoft.AspNet.WebApi.Client": "5.2.2",
"NETStandard.Library": "1.6.1-*"
},
"frameworks": {
"netstandard1.6": {
"imports": [
"portable-net451+win8"
],
"dependencies": {
"System.Runtime.Serialization.Xml": "4.3.0-*",
"System.Xml.XmlSerializer": "4.3.0-*"
}
}
}
} |
I get a 404 when I use that issue link, but I'll take your word for it =) |
Right, it's a private repo and I shouldn't have linked to it (yet). We are however working on exactly this issue. |
@dougbu do I need all of the JSON you presented? I assumed I just needed the |
Yes, for now the |
So what is the alternative for Whats the dotnetcore version of:
|
currently there isn't one @shawnmclean. you can use the suggestion above to use the old nuget packages in a .net core project. if you want i can provide a snippet that matches the csproj style instead of project.json. alternatively you can wait until the next version of that nuget package is released, which will support .net core. |
@smarts yes please, the csproj style is much appreciated. Thanks! |
in your csproj… <PropertyGroup>
<PackageTargetFallback>$(PackageTargetFallback);dnxcore50;portable-net451+win8</PackageTargetFallback>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="microsoft.aspnet.webapi.client" Version="5.2.3" />
<PackageReference Include="system.runtime.serialization.xml" Version="4.3.0" />
<PackageReference Include="system.xml.xmlserializer" Version="4.3.*" />
</ItemGroup> |
So how about that .NET Core update for microsoft.aspnet.webapi.client? Still on the way? |
Here's my approximation to the old
|
Great effort @atykhyy ! The problem [for me] is that the code above is tied to the ASP.NET Core MVC abstraction(s), not |
Yes, these are for server-side use. There is a |
I'm aware of the upcoming package. This issue pre-dates the tracking issue for the upcoming package and is referenced there. Unfortunately, this isn't a case for which a pre-release package is desirable. Thanks for the suggestion though @atykhyy =) |
@junkomatic Looks like support for .NET Core 2.0 has just been added to Microsoft.AspNet.WebApi.Client. |
Is
System.Net.Http.Formatting
coming to ASP.NET Core? Specifically,ObjectContent
,ObjectContent<T>
, and theReadAsAsync<T>()
extension methods forHttpClient
? I started looking into porting it but the change fromMediaTypeFormatter
toIInputFormatter
andIOutputFormatter
- and more generally, the divergence of ASP.NET MVC's and HttpClient's HTTP models - makes things difficult for someone new to ASP.NET Core.A couple of issues:
HttpContext
(e.g., seeInputFormatterContext
) instead of just the type to be deserialized andHttpContent
MvcOptions
)The text was updated successfully, but these errors were encountered: