GenesysStack.com
RSS

Blog posts of '2016' 'December'

How-to fix: Mvc Error CS0012 The type is definied in an assembly that is not referenced
After deploying a MVC project to the dev web server, a new partial view based on @model List<> began to throw the following exceptions: ·         Error    CS0012            The type 'DateTime' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. ·          Error   CS0012            The type 'List<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Collections, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' The fix was to alter the following block in your Mvc project root web.config: From: To: