Reputation: 1305
I whant override MultipartMemoryStreamProvider
. In class library project I added reference on System.Net
and System.Net.Http
. Also I added using for this namespaces in 'cs' file.
When I'm write
public class MyProvider : System.Net.Http.MultipartMemoryStreamProvider`
The Intellisense doesn't recognise MultipartMemoryStreamProvider
.
My class library project under is built with .Net Framework 4.6.1.
Also solution includes a web project with analogous parameters but in web project this problem is absent.
What am I doing wrong? And what assembly should be added to the class library project?
Maybe I must install System.Net.Http
from NuGet?
Upvotes: 1
Views: 1516
Reputation: 118937
You have the correct namespace, but the MultipartMemoryStreamProvider
class is in the System.Net.Http.Formatting
library, you need to add a reference to that instead.
Note the description of the class on MSDN says:
Assembly: System.Net.Http.Formatting (in System.Net.Http.Formatting.dll)
Upvotes: 2