How to deal with Microsoft.AspNetCore.Http.Abstractions while migrating from 2.2 to 3.1? #23276
Unanswered
lesscodetxm
asked this question in
General
Replies: 1 comment 2 replies
-
@lesscodetxm thanks for contacting us. I believe you are right and the only solution to this is break it into multiple assemblies. That said, even if you do that, you can keep the source in one place and reference it through LinkBase, something like |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We have a lot of ASP.Net APIs that we're migrating to 3.1
We created a (.Net Standard 2.0) core shared library that offers a bunch of conveniences and extension methods to handle service registrations, Polly policies, etc. That library references
Microsoft.AspNetCore.Http
(2.2.2) for abstractions likeIApplicationBuilder
andRequestDelegate
.It looks like these now live in
Microsoft.AspNetCore.Http.Abstractions
, but since there's no 3.1 version of that assembly available the advice seems to be to add a framework reference toMicrosoft.AspNetCore.App
and change theTargetFramework
tonetcoreapp3.1
.Unfortunately our shared library is consumed by other types of apps (eg. full framework 4.7.1 WPF apps), so we can't really do that. If we set the
TargetFramework
tonetcoreapp3.1;netstandard2.0
the compiler fails to find the Asp.Net namespace and abstractions (but I doubt that would solve our problem anyway).I assume we need to separate out our core library into two assemblies, right? Or is there a simpler solution?
Beta Was this translation helpful? Give feedback.
All reactions