Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Issue to create a AbpApiController using .Net Core 2.2 Class Library #7976


User avatar
0
sunilkosuri created

Hello,

We are trying to create a Web API Controller Layer using the Application Services Layer. We are using .Net Core 2.2 for this.

We created a Class Library project using the .Net Core 2.2 , but it is complaining about references

public class MyTestController : AbpApiController { // code goes here
}

Error: CS0012 The type 'ApiController' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Web.Http, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

When trying to add a reference to above DLL, But, it gives an error as attached below

Appreciate any help to resolve this issue.

Vishnu


4 Answer(s)