I set up a class in project 1 that extends the WebViewPage so that I can add my own extension method. I followed this page: right here.
I have a second project that holds a class and an object. This project's .dll is referenced in project 1 and registered in gacutil.
The extension method uses the object that is in project 2. Whenever I go to use my newly implemented extension method on the page, I get the wonderful CCS0012 error.
CS0012: The type 'namespace.AppAuthentication.type' is defined in an assembly that is not referenced. You must add a reference to assembly 'namespace.AppAuthentication'
I have been able to debug through and see that the object has been setting correctly. Even when I parse it into JSON and display it to the console in jquery... everything is there! It is only when I access the object in the view.
Project 2 is referenced in project 1. Project 2's .dll is registered in my gacutil. The only way this works is if we set "copy local" to true on the reference. Except, this is not an acceptable option for me. I have been trying everything under the sun, and everything listed on this post: right here.
I would be extremely grateful if anyone can shed some light on this matter. To me, it seems Razor cannot access assemblies registered in GAC.
*edit: fixed title