Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: CS0246: The type or namespace name 'Infragistics' could not be found (are you missing a using directive or an assembly reference?) Source Error:
Line 1: @using Infragistics.Web.Mvc; Line 2: @{ Line 3: ViewBag.Title = "Home Page";
I downloaded the code from
http://blogs.infragistics.com/blogs/taz_abdeali/archive/2011/05/31/asp-net-mvc-3-entity-framework-infragistics-jquery-grid.aspx
and ran it directly, and then got the error
Hello,
I encountered the exact same problem - to my understanding here's what's wrong: The reference to the Infragistics.Web.Mvc DLL had been added and it's property CopyLocal was set to True.
However, if the project is transferred to another computer, that setting is reset, thus compiling the project doesn't cause the expected copy of the DLL from the GAC into the project's "bin" folder.
There are two workarounds that I can propose:
1. Simply set CopyLocal = True on the reference to the Infragistics.Web.Mvc DLL
(this will reset if you open the project on another computer)
2. Add the following line to the <assemblies> group in the web.config file of the project (not the one in the "Views" folder):
<add assembly="Infragistics.Web.Mvc, Version=3.11.2.2021, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb, processorArchitecture=MSIL"/>
All you need to do is to replace the version number (3.11.2.2021) to the one you have.
The downside to this approach is that you need to manually alter the version number every time you get a new build.
Let me know if this helps.
PS: I managed to open the Northwind database from the sample with SQL Server 2008 Express R2, but could not do so with SQL Server 2005 Express - unfortunately this is due to the fact that MSSQL databases (the MDF files) suffer from a lack of backwards compatibility. Good news is that you can simply get a fresh copy of Northwind and use that instead.
Thank you , this helped me resolve my Issue.