C
C#2y ago
khamas

✅ referencing `WebApplication` from a class library

Hey so I'm trying to create a middleware library, but I can't install Microsoft.AspNetCore.App.Ref package as it is an internal library, how can I reference WebApplication?
7 Replies
Thinker
Thinker2y ago
afaik you can include <FrameworkReference Include="Microsoft.AspNetCore.App" /> in your csproj to reference the ASP.NET core library without the library being a web app.
khamas
khamasOP2y ago
I tried to reference it but the type did not exist
JakenVeina
JakenVeina2y ago
out of curiosity, why do you need to reference WebApplication just to make some middleware?
khamas
khamasOP2y ago
I actually need to reference the builder, mb
JakenVeina
JakenVeina2y ago
isn't that an interface? IWebApplicationBuilder which exists in a separate Abstractions package?
khamas
khamasOP2y ago
yeah will check am on break rn
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server