This repository has been archived by the owner on Dec 14, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Actions lost when referencing Microsoft.AspNetCore.Mvc in dependency #4674
Labels
Comments
/cc @javiercn |
I believe this is a dupe of #4555 |
Yup, dup of #4555. |
@BillDines, you should be able to workaround this by explicitly registering your ClassLibrary as an application part: In your startup: services
.AddMvc()
.AddApplicationPart(typeof(ValuesControllerFromClassLib).Assembly) I suspect this is an issue with how |
That's alright. It'll help us to keep track of the underlying issue so that it works out of the box. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When you have some library that references Microsoft.AspNetCore.Mvc such as in the following project.json
ClassLibrary1 project.json
and you have an application that depends on MVC by referencing this library, it causes actions to not be added to the ActionDescriptorCollectionProvider.
This can be reproduced by the following steps:
Create an ASP.NET Core Web Application with the default web application template
Add a class library as a project
Change project.json of the class library to the content listed above in ClassLibrary1 project.json
Remove reference to Microsoft.AspNetCore.Mvc in web application project.json
The following can be used to verify there are no actions being found
The text was updated successfully, but these errors were encountered: