Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_ViewImports unable to resolve assembly containing custom tag helper #6

Closed
JaimeStill opened this issue Feb 16, 2017 · 1 comment
Closed

Comments

@JaimeStill
Copy link

With regard to the Intermediate ASP.NET Core - Tag Helpers demonstration, whenever I try to add a reference to a custom tag helper, I get the following error:

tag-helper-error

I created the RepeatTagHelper.cs class in the project root of the ASP.NET Core app as Scott did in the demonstration, then tried using @addTagHelper in _ViewImports.cshtml and got an error similar to the one above.

Additionally, I tried to add a new .NET Core Class Library to the solution and build the tag helper into that. I added the appropriate NuGet packages to the class library, add a solution reference to the ASP.NET Core web app project, and tried to add the tag helper as shown above, and it still throws an error.

I've uploaded my project to GitHub. The RepeatTagHelper.cs class is included in the root of the web app, as well as in the class library in the TagHelpers folder. _ViewImports.cshtml is currently referencing the class library tag helper.

@JaimeStill
Copy link
Author

JaimeStill commented Feb 23, 2017

Given the (admittedly strange) naming convention that I used for the project, the @addTagHelper declaration references the .dll, which would be named mvc-form or core-resources rather than the namespace that visual studio automatically modified when the project was created. See this StackOverflow Answer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant