vendredi 20 mars 2020

Access Assembly Info From Tag Helper that is in separate project

I have a .NET Core 2.1 project where I have an MVC project that contains all of the controllers and whatnot. I then have a separate project for custom tag helpers. I need to access the assembly for the MVC project in my tag helper to get information about controllers using reflection; however, the problem is that I am not able to add a reference to the MVC project in my tag helper project because that would create a circular dependency. My first thought was to try and use the ViewContext class to get at the assembly info of the MVC project, but I have not had any luck. Is there anyway to pass assembly info from the MVC project to the tag helper, or do I need to move my tag helpers into the MVC project?

Hopefully, this question makes sense. Any help would be appreciated.





Aucun commentaire:

Enregistrer un commentaire