got an odd case here and I can't pin down the issue.
I created a Nuget package that contains MVC Views and Controllers (this way we can import them to multiple projects as a base). On myMVC project Home\Index.cshtml we have a reference to '@Constants.programName'. The Constant file will exist in whatever program imports the Nuget package.
Here is where is gets odd. In my test program 'Nuget_Test' (just a standard C# MVC app), I can load 'myMVC.nuget' which adds Home\Index.cshtml AND most importantly it resolves '@Constants.programName' to Nuget_Test\Constants. However, if I load the exact same 'myMVC.nuget' into my actual program it fails to resolve '@Constants.programName'. Instead it requires I add '@using ProgramName'.
I am trying to figure out why it works for Nuget_Test but not MyProgram. If I can resolve this, I have 6-7 additional Views that utilize @Constants.ProgramName I could move to the myMVC nuget. However, I don't want to add them to the nuget package if I'm going to have to have developers constantly going and updating those files.
Constants.cs and Views are both in the same location for each project (i.e. Constants.cs is at same level of Views directory). Both use .net Framework 4.6.1 with output type being 'Class Library'. The only real difference I've found is Nuget_Test is the Assembly and default namespace for the test application, while my other application is Assembly Name PROJ and default namespace PROJ.App (with the solution being PROJ and main project being PROJ.App). Can anyone provide some ideas what setting this might be so I can make it resolve and move the remaining Views?