I have created an WEB API in ASP NET 5 and I can reference an external Class Library vNext. I am working on Visual Studio 2015 Community. In that Library I have this controller:
[Route("api/[controller]")]
public class NovosController : Controller
{
// GET: api/values
[HttpGet]
public IEnumerable<string> Get()
{
return new string[] { "i am", "an external library" };
}
To add this library in my Web API´s references I had to browse the DLL's (one for dnxcore50 and one for dnx451).
This is the result:
dnx451
dnxcore50In my web API I can get the data from that controller but I can't acess it from URL. But if the library is in the same Solution I can acess it from the URL.
For example:
If external library:
localhost:51000/api/novos
returns me nothing
but if the library is in the same solution:
localhost:51000/api/novos
returns me " i am an external library"
I want to acess by URL to the external library but I can't find any solution to my problem, there is anyone that knows how to make this thing work?