Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

Can't find class in razor views but can in controller action

$
0
0

I have an ASP.NET core web app targeting full .net framework and a reference to class libraries that are targetiing same version of .net framework as asp.net core web app.

In a razor view that makes a reference to a class in the class library I get this error :

The type 'XXX' is defined in an assembly that is not referenced. You must add a reference to assembly 'XXX'

However in the controller action that returns this view I can access the class fine.

Am I missing something.


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>